Don’t Fight The Tools

I’m a .Net developer by profession. So it’s only natural that I hate PHP. OK, I don’t hate it, but I find it quite frustrating. I think that the reason that this is, is because they are just so different. They take a completely different approach to accomplishing the same thing. So when I go to program something in PHP, which I don’t do that often, I try to write .Net code in PHP. This is very difficult. In the latest project I did, namely, this blog, I tried to do the exact opposite. I decided to write my PHP to make it look like PHP. To me, it seems a little unnatural. Mixing in logic and presentation. Mixing in database access code with presentation. Basically creating no layers between anything. Get some data from a database, output the data with HTML tags interspersed with the data.

PHP has added a lot of stuff to try to get away from it’s humble beginnings. They’ve added objects, namespaces, frameworks for doing MVC or other types of architectures. But I find that all of it is kind of done poorly. Without getting into too much of a rant, it seems like PHP is just trying to add features, just to be like the big boys. But in the end, it makes everything look inconsistent, and gives people a bad impression. Nobody complains that C doesn’t have classes, interfaces, and namespaces. If you want that, go find another language. PHP could have taken a lesson from that, but alas it’s too far gone.

It’s really similar to this Ask Slashdot article. The first post sums it up. Don’t try to write C++ or Java in Javascript. Similarly here. Don’t try to write .Net in PHP. And I wish PHP would just be happy being PHP.

Leave a Reply

Your email address will not be published. Required fields are marked *