>Management of the autogeneration stuff + extra
>stuff would be a royal pain in the ass.

My approach to this problem in Town was to encourage human changes 
only to a subclass of the main generated class.  That way you can 
regenerate the superclass without wiping out your additions.  If you 
want to change the behavior of a generated method, just override it 
in the subclass.  This isn't perfect, of course, but works well 
enough for my purposes. :)

>If you take a look at the latest beta of Town
><http://www.working-dogs.com/town/>, it does a pretty good job of doing the
>autogeneration stuff except that it is generated from a db.schema instead of
>a xml file...

It would be fairly easy to plug in an XML parser in place of the SQL 
one; but I figured that you have to have the SQL version of your 
schema on hand anyway.  You're right that a better solution for the 
whole thing would be to generate the SQL from XML also... though the 
generator would have to know the quirks of different SQL variants for 
different DBs, and the XML stylesheet would have to accomodate all 
the options available in different SQLs; this could get very messy. 
Probably there are already XML stylesheets floating around that 
mirror SQL create table statements for some DBs anyway?

-ds

____________________________________________________________
David Soergel                                [EMAIL PROTECTED]
Department of Genetics                  http://www.lorax.org
Stanford University School of Medicine        (650) 303-5324
____________________________________________________________


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to