By ahwulf
via codist.biit.com
Published: Dec 11 2006 / 13:47
How PHP can be so popular is beyond me; the whole sense of encouraging all of your html, code, bindings, javascript, even sql into a single file seems like a nightmare.



Comments
jcblitz replied ago:
"...the whole sense of encouraging all of your html, code, bindings, javascript, even sql into a single file seems like a nightmare."
Just because you can do something doesn't mean you should. There are a bunch of php frameworks out there that take care of this for you, but they're not needed if you don't want to use them. I use to bash PHP all the time until I actually used it. It works well for what it is. As long as you follow well layered/decoupled programming practices it's fine.
rob.desbois replied ago:
Agreed -- I use PHP daily and have no need to combine data acquisition, processing or display/presentation into one file.
My method of separating different parts can be a little crude if not handled properly, but I use a PHP layer for DB-abstraction where possible (this is the hardest part IMO), a PHP layer on top for pre-output processing and user input handling, Smarty (http://smarty.php.net) for the HTML layer which I prefer to combine with Javascript personally, then separate CSS file to complete it.
jiminoc replied ago:
The author is a moron. No one in the php community encourages this.
Lowell Heddings replied ago:
Calling the author a moron doesn't really help your point....
But I do agree that this is a badly written article, with little point. You can take bad code examples in any language and make claims about the inferiority of it.
jiminoc complained ago:
jiminoc reported this link as inaccurate on 12/11/2006 @ 03:40:28
no one encourages this
cha0sth30ry complained ago:
cha0sth30ry reported this link as lame on 12/11/2006 @ 06:53:25
Anyone can say the same of pretty much any language... it's better to write about why your language is cool or how to make php better
Doug Karr complained ago:
douglaskarr reported this link as inaccurate on 12/11/2006 @ 10:16:58
suddenfreezes complained ago:
suddenfreezes reported this link as inaccurate on 12/11/2006 @ 11:00:41
I agree that no one encourages this
Rob Lang replied ago:
It appears that the author has not fully understood the breadth of PHP and has taken the basics at face value. Any programming language can be abused and use to create code that is a nightmare to maintain.
The good thing about PHP is that it is quite easy to create your own UI layer without the tight strictures of other programming models. You can create class libraries and use those for printing to the screen. This does mean more work but for some projects, this flexibility might be preferable to the tight strictures of Java or .NET.
claymore complained ago:
claymore reported this link as inaccurate on 12/12/2006 @ 10:03:06
Rafael Dohms complained ago:
rdohms reported this link as inaccurate on 12/12/2006 @ 12:45:44
How anyone can have the guts to write a bad review of something he absolutely has no knowledge about is also beyond me.
bloid replied ago:
The followup article is now out: http://www.dzone.com/links/followup_to_i_will_never_understand_the_appeal_of.html
Voters For This Link (21)
Voters Against This Link (2)