I'll second datamgr as an excellent solution for ensuring your db is always in sync with your application. It has simplified some of our biggest issues with keeping our 200 plus databases managable.
----------------------- Sent with ChatterEmail True push email for the Treo Smartphone http://get.chatteremail.com -----Original Message----- From: Steve Bryant <[EMAIL PROTECTED]> Date: Thursday, Jan 12, 2006 8:41 am Subject: Re: [CFCDev] DAOFactory and BeanFactory based on XML Schema Cameron, You might also take a look at my DataMgr component *just* for the table creation/alteration stuff. It doesn't get involved in generating code of any kind. It does manage creating tables and columns in pretty-much the way you describe though. http://www.bryantwebconsulting.com/cfcs/ Thanks, Steve Bryant. Bryant Web Consulting LLC http://www.BryantWebConsulting.com/ http://steve.coldfusionjournal.com/ At 10:41 PM 1/11/2006, Cameron Childress wrote: Joe (and Tim), >The primary motivation was initially to find a way to easily define a database schema in one place, and then have tools build it for me on any platform (mySQL, MS SQL, etc). I also wanted to be able to update that dataschema dynamically and automatically without building deploy scripts for new versions of code. This led me to defining the tables in XML and allowing a set of CFCs create the tables and alter them on the fly if needed. >Potentially I'd just include a call to these CFCs at a strategic in my app and deployment of any new versions of code would be easier since they'd automatically detect and update the database if needed. For shrink wrap CF apps this could help alot with upgrades, but it could also help simplify things when moving from dev to qa, to staging, then production. It would also come in handy if you want to write your data schema once (in XML) and have it automagically work on many various RDBMS platforms. >So after I finished thinking about that, I considered that while I was at it I could include CF type and special formatting rules into the XML and also use this data to dynamically generate DAOs and Beans that were smart enough to bind CF validation rules to the data objects. I might do something like: ><table name="user"> <column name="phone" type="varchar" len="32" validation="us_phone" /> </table> >The tool would create/alter the table if needed, generate a user bean for me, and then bind us_phone validation rules to the method user.validate(). >Pretty much everything the existing tools mentioned in this thread do, cept for the validation and table creation stuff. But that's the explanation of where I am coming from with the ideas... I'd welcome any comments or critique of the idea. >-Cameron >-- Cameron Childress Sumo Consulting Inc http://www.sumoc.com --- cell: 678.637.5072 aim: cameroncf email: [EMAIL PROTECTED] -- ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
