revjim.net

Propel! Creole!

PHP5′s Propel is an amazing library. It is based on Apache Turbine for Java. Well, it’s great in theory, anyway. I can’t run it, because I don’t run PHP5 currently. I’d love to, really. But, running PHP5 apps in production might not be the best idea when PHP5 is still beta. Additionally, if I were to write something like Inklog in PHP5, I would decrease my userbase, at least for now, drastically.

Regardless of those aspects, it looks great. The basics premise is this:

You describe your tables and their relationship to one another using XML files. A Phing build then converts that XML data into configuration files for use with Propel. as well as a bunch of PHP5 classes (yes, it actually writes the code) that are designed to access those tables using Propel. In the end, you end up with database tables that are directly related to PHP5 classes that allow objects to be stores and inflated at will. Additionally, you have an entire set of classes known as Peer classes, which allow you to retrieve the objects via a specific criteria.

Very powerful stuff. A large portion of what it is capable of is due to Creole, the PHP5 database abstraction layer. It’s essentially PEAR::DB on crack. Based on JDBC for Java, it takes an object oriented approach to interfacing with an RDBMS.

I can’t wait for PHP5 to get out of beta. There’s so much neat stuff waiting just around the corner. Hell, maybe I should give it a shot now and see just how stable it is and how well it will run my PHP4 code.

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>