FWIW, in my demo that will be available this weekend, every persistent object in the system will become a class like this, and can be auto-generated, simply by creating an xml definition of the database schema. In this way we can also auto-generate install/upgrade sql scripts. And there is built-in subclassing support, so you can simply identify subclasses via an extra column in the table, and have it handle Widgets and any subclasses of it in a single table. In the generated stub classes, we add our content management logic and API function implementations. We just need to figure out the specifics of migrating from one table structure/class definition to another when making major changes. I have an idea of how to manage that with Phing and the XML schema representing the data/object model. Imagine changing a class definition and having the appropriate install and upgrade SQL scripts for all supported DB platforms generated automatically at build time, along with API docs re-generated and uploaded to our web site... This is where I want to take this project; I’ve been there before, and it’s not as hard as it sounds. It just takes a dedication to laziness and good knowledge of OO patterns (as well as anti-patterns, as Victor reminded me

).
I’ve worked on many OO systems, including ones that used code generation techniques, run-time class generation, automated builds with unit-testing, Extreme programming techniques, etc. And this will make development of the core of MODx as easy as it is to develop sites with it once we all get the hang of it. Even better, it will attract real talent to our team that can only help make MODx even better.