One man’s voice Thoughts, rants and commentary from a husband, father of five and professional web geek

7Aug/070

How did we ever do it?

I spent the better part of the day today putting the finishing touches on integrating a little one page navigation application into an existing web site. The existing web site code is utter trash.

It is assembled badly. It is usable, but bad. Trying to get things to work with it us a challenge. Paths are hard coded into the app. Includes are used incorrectly (like including a part of the header of the HTML, but not the entire header, so that every page of the 50+ page site has some common HTML embedded into it). But in all, it is workable.

The part that make me hiccup is the fact that it is on a machine running PHP 4 with a MySQL 3.23 backend. That hurts. I have spent the last year developing primarily in PHP5 (about 97% of the PHP I code is in PHP5) and having to code a class, a view and a model for PHP 4 just flat hurt.

I love visibility scope declarations in PHP 5 OOP. I like declaring methods as static. It makes me happy. Looking at PHP 4 classes really make me cringe. And what's worse (this is not related to my project today) is that I have recently started downloading code packages that are marketed as being PHP5 code only to find that they are coded to be backward compatible PHP4 apps. They use none of the PHP 5 features available to them.

For those that are interested, I did find one application so far that is possibly the prettiest thing I have seen in code. It is the Solar Framework from Paul M. Jones. It has a bit of a learning curve if you want to use it, but from a code perspective, it reads like poetry. It is absolutely beautiful and it is 100% PHP5 OOP. There is not an ice cube's chance in hell that it will ever run in a PHP4 environment. Now that is commitment.

Sort of like Bacon and Eggs... the chicken is involved but the pig is committed.