On Pretty Horrible Programming
First, I get the irony of posting this on a blog engine written in PHP…
In the past month or two, I’ve had to dig into the sources for a few different PHP projects. It’s not been fun… Though I’m admittedly ignorant about PHP’s various MVC frameworks, none of the apps I’ve been debugging have used one. The result? More spaghetti than found in all of Italy… Chasing down bugs through endless layers of includes and seemingly convention-less folder structures has soured me on a language I once wanted to learn.
One project I’ve been debugging has a strange path through an error handler that leads to a 404 header being written, hiding the original error completely behind a ‘File Not Found’ page. OK, so I know this is nothing PHP specific, but trying to trace down the original error has been a nightmare. This project, which has been a tremendous help to me as an adjunct, is well supported and in widespread use. But wow, it gets hairy trying to trace through the code…
I’m sure that PHP can be used effectively, and maybe even be made elegant. But I wonder why anyone making a platform choice for a new project would opt for PHP. Castle’s MonoRail has totally sold me on the value of a convention-oriented MVC framework. Debugging a MonoRail app is a predictable and rather pleasant experience. If static typing isn’t your thing, then TurboGears looks nice from what I’ve seen. I’ve been digging Ruby, but haven’t worked with Rails. I’m looking forward to writing my next personal project with Rails though.
RSS feed for comments on this post. | TrackBack URI
April 16th, 2008 at 11:14 am
Speaking of MonoRail and MVC, have you taken a look at Microsoft’s new MVC framework? You may be interested in next month’s .NET user group meeting in Stamford, CT (http://FairfieldWestchester.net — more info about this meeting will be posted shortly), where Aaron Armstrong will be presenting on it. The meeting is on May 6th. Maybe we could have a smack down debate between you guys at a future meeting, or maybe you can challenge him with some questions in May
April 17th, 2008 at 12:02 am
I’ve not looked at it yet. But of course I’ll be there on the 6th… And I’m always game for a debate in which I’d get to defend a solid open source project against Microsoft’s late entry ;).
April 17th, 2008 at 8:11 am
Microsoft may be late, but at least they’ve started to pay attention to what developers are looking for, and implementing their own pretty decent solutions to satisfy those who’d like to stick with MS solutions.
And it’s free.