On Feb 6, 2008 10:59 PM, Larry Garfield <larry@xxxxxxxxxxxxxxxx> wrote: > On Wednesday 06 February 2008, Edward Kay wrote: > > Have a look at Qcodo. http://www.qcodo.com. > > > > It uses code generation to create your ORM for you direct from the DB > > tables. As it's code generation as opposed to run time analysis (which > is > > what ActiveRecord and the like use), there is no performance hit - it > > literally just creates your PHP class files for you. > > Uh, lots of Active Record systems use code generation. If the structure > of > your data abstraction is based on the database structure, then you're > using > Active Record. It's record-centric. If you're using an object-centric > view > of the world that may just happen to tie to an SQL database for its data > store, then it's an ORM. > > Both are useful in different circumstances, but whether or not there is > code > generation has nothing to do with whether it's AR or ORM. > well i think its worth a mention that qcodo has an article that distinguishes 'ActiveRecord classes' from the 'ActiveRecord pattern'. http://www.qcodo.com/documentation/article.php/6 what it mainly says is that code generation increases performance over runtime analysis of some model; eg. the database schema or perhaps some other representation, such as xml (or yaml [apparently ;)]). the article also classifies ruby on rails as one of these obfusticators of fowlers original pattern; greg, thoughts ? anyway, im not sure i agree with the distinction of code-generation vs. metaprogramming; i sort of see them overlapping. and also, on the original topic of the thread; there was just another thread on this the other day; check out propel and doctrine; and said thread ;) http://marc.info/?l=php-general&m=120215073929527&w=2 -nathan