HTML5 Canvas
Written by: Simon Sarris
Featured Refcardz: Top Refcardz:
  1. Apache Hadoop
  2. Web Driver
  3. MVVM
  4. REST
  5. ADO.NET
  1. HTML5
  2. Ajax
  3. jQuery Selectors
  4. CSS Part 1
  5. Git

Link Details

Link 8823 thumbnail
User 200929 avatar

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.
  • 21
  • 2
  • 2440
  • 0

Comments

Add your comment
User 191902 avatar

jcblitz replied ago:

7 votes Vote down Vote up Reply

"...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.

User 211543 avatar

rob.desbois replied ago:

0 votes Vote down Vote up Reply

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.

User 211123 avatar

jiminoc replied ago:

1 votes Vote down Vote up Reply

The author is a moron. No one in the php community encourages this.

User 205047 avatar

Lowell Heddings replied ago:

3 votes Vote down Vote up Reply

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.

User 211123 avatar

jiminoc complained ago:

2 votes Vote down Vote up Reply

jiminoc reported this link as inaccurate on 12/11/2006 @ 03:40:28

no one encourages this

User 205872 avatar

cha0sth30ry complained ago:

2 votes Vote down Vote up Reply

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

User 209687 avatar

Doug Karr complained ago:

1 votes Vote down Vote up Reply

douglaskarr reported this link as inaccurate on 12/11/2006 @ 10:16:58

User 209850 avatar

suddenfreezes complained ago:

0 votes Vote down Vote up Reply

suddenfreezes reported this link as inaccurate on 12/11/2006 @ 11:00:41

I agree that no one encourages this

User 201565 avatar

Rob Lang replied ago:

0 votes Vote down Vote up Reply

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.

User 200648 avatar

claymore complained ago:

0 votes Vote down Vote up Reply

claymore reported this link as inaccurate on 12/12/2006 @ 10:03:06

User 205787 avatar

Rafael Dohms complained ago:

0 votes Vote down Vote up Reply

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.

User 111696 avatar

bloid replied ago:

0 votes Vote down Vote up Reply

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.