Quote from: OpenGeek at Jan 15, 2008, 05:14 PM
As one example, splittingred (one of the core MODx developers) recently introduced xPDO into a custom Smarty-based framework he develops and maintains at work, replacing the PEAR MDB2 O/RM library he used previously. I believe the performance gain was two or three-fold even without using native PDO (via PDO emulation layer using mysql extension), and a recent upgrade to a PHP version with native PDO showed even more improvement. You’ll have to ask him about any other benefits or issues he’s experienced in his use of xPDO.
Yep, that’s true. Also, we’ve been recently using the DB result-set caching ability of xPDO, and I’ve found it to be incredibly fast now (especially since most things now are run in AJAX calls via Ext and JSON data).
I’ve also found it massively helpful in separating code from content. I’ve been able to develop a program structure with xPDO that mimics the benefits of MVC, while also allowing for a "poor man’s web services" ability via AJAX connectors (a feature you’ll see in modx097). The result is that everything is highly extensible, incredibly easy to maintain, and ridiculously compact - with a lot of that help coming from the simple, easy-to-extend xPDO framework.
I have found some issues with xPDO’s abstraction of the SQL query in highly complex queries (specifically nested parenthetical statements in WHERE clauses), but that is easy to get around, as xPDO allows for sql-type-specific commands in your object classes (ie, Customer_mysql is used when xPDO is instantiated with a mysql DB type). So, I can write the DB type-specific, complex queries in the different subclasses, and easily switch between the two. Takes me a grand total of 5 minutes extra.
(And I note these are exception cases, rather than the rule.)
I would highly recommend xPDO. There might be a slight learning curve for those not familiar with extendable ORMs, but once you get a hang of it you wont turn back. I’ve seen a lot go through PHP in my 10 years in web-dev, and I’m definitely sticking with xPDO for now.