PHP and view/controller separation

Ironic that I find myself defending PHP at a point when I’m making a huge effort to move most of my web coding to Python, but I keep running across mini-rants along the lines of “PHP sucks because it mixes business logic into your HTML.”

No, it doesn’t.

It makes it possible, sure. But it’s completely avoidable. As The Daily WTF can show you, it’s possible to do screwy things in any language.

So remember:

PHP doesn’t mix business logic and presentation – people do.


miguev commented on Thu Apr 13 12:21:39 2006:

Maybe you wouldn’t like to answer me, but… how can I have view/controller separation with PHP a la Django?


Paul commented on Thu Apr 13 13:08:59 2006:

For PHP frameworks, there are a lot of choices. I haven’t used any of them enough to make recommendations, but in this post I link to several of them and in this post I link to a directory with even more.



Share: