From: Hans L. <ha...@ve...> - 2003-10-30 14:38:18
|
Hi Folks, For the past sevaral months I've been developing Propel, a PHP5 port of the Apache Torque object persistence layer. In many ways Propel (and Torque) is quite similar to PxDB/Syntax, so it might be interesting to look at. http://propel.phpdb.org for the glossy view. In short, the way Propel works is: 1) You define your data model in XML (a fairly simple schema) 2) You use Phing (PHP build tool, based on ANT) to "build" the object model; this step creates classes for manipulating objects in the database and SQL definition (dump) files to create the database in your specific RDBMS. 3) You use the created classes in your scripts to search & manipulate rows & tables in your database. Every class has a Base class and an [initially] empty subclass which is where custom behavior can go (i.e. you use overrides in subclass to avoid needing to change the om templates for custom behavior). Some features: + Advanced support for inter-related objects. Ability to fetch related records within the same primary query (BookPeer::doSelectJoinAuthor($criteria). Also, cascading save & delete is supported. + Support for inheritance + The DB structure is much more traditional than Syntax's: e.g. there's no monster "records" table. + Similar to Syntax, a Criteria/Criterion system is used to construct queries. Propel's Criteria system is quite a bit more complex than Syntax's, though, making it possible to do very complicated logical combinations. On the other hand, Propel is not a CMF; it's just an object persistence layer. There is no perms/privs support; there is no DBasis tool for working with the XML. Neither is there a "Context" tool to provide an admin interface. Things like this may come to exist in the future; the team member who is writing the Oracle drivers is also working on "Combine", a port of Turbine which provides a framework on top of Propel. Obviously this servers a different need from PxDB/Syntax, but wanted to let you know that the Propel tools are pretty nice for working with traditional database designs in an object-oriented fashion. Anyway, it's been a fun project. It was neat to see that PxDB stuff is quite good at stuff like SearchCriteria objects for query construction, etc. Cheers, Hans |