OO PHP is the shizzilage!

January 22, 2007

Ok, I have been programming in PHP for a few years now but I have never ventured into the OO(object oriented) part. While recently working on a java project I realized how much nicer it is to have an object to work with. You can give that object properties and methods and make it work for itself. So I was sitting working one day and I thought to myself. ‘Hey stupid! why not try it out with PHP!’. So I hopped on my faithful friend google and searched for PHP class examples to make sure I had the correct syntax.

Well long story short I have used OO on two projects now and it friggin rocks! When I build things I build sorta like moving up from Assembly to a higher level language such as Java. My database could be considered the Assembly part. I design it from scratch with my bare hands. Then moving on up the line I create the object which represents one entry, or row, in the database. The next higher step is to make an object list so I can pull many of the objects out of the database at once. And that basically forms the toolkit, then I can create the object manager which is like the Java language. I already have all the tools at my disposal, all I have to do with the manager is interact with them! Presto! I have everything I need now. All that remains to be created is the actual interface for displaying said object.

Oye. I think I am in love….