Wow, this is a good-sized thread. I've been working on a bit of code called "Rocket" since I started Model-Glue, with the aim of generating basic "bootstrap" CRUD code for consumption by any CF framework (or lack thereof). I'm going to try to have an early (at least demoable) release ready for the F&F conference next week.
Rocket itself focuses on a "project" XML file that describes entities. Entities contain properties, which can be references to other entities. Rocket itself basically reads this XML and then passes it to registered "generators" (registered via an XML file) that can do just about anything with it. Generators I've created focus on the entities themselves, ORM and persistence objects, an app-wide service layer, and the necessary Model-Glue files to create a site that consumes this service layer. It'd be a snap to create FB or M2-specific code generators and "site templates" (the base code, like the RoR skeleton, that a site starts with). I think this a lot along the lines of what Dave Ross mentioned earlier - a code generator, not a framework. The CFC generators in Rocket generate both a _rocket_myFile.cfc file and (if it doesn't already exist) a myFile.cfc file in the target directory. MyFile.cfc extends _rocket_myFile.cfc: you can therefore override logic, then re-run the code generator to do something like adding a property, and not lose what you've done. For a given entity, it'd generate the following: Entities: Entity.cfc (extending _rocket_Entity.cfc...) EntityBean.cfc (extending....) EntityTO.cfc (you get the point...) ORM/Persistence: EntityCollection.cfc (lazy-loading collection / iterator on Entity) EntityDAO.cfc EntityGateway.cfc Business Rules: EntityValidator.cfc Service layer: Regardless of entities, Rocket generates a RocketService.cfc (and _rocket_RocketService.cfc that it extends) that provides a basic set of CRUD functions for each entity, like PutEntity(), GetEntity(), ListEntity(), and ListEntityReferencedEntity() (e.g., ListBlogEntryComments() on a BlogEntry entity). Right now, it also generates a Model-Glue specific Controller.cfc and View files. The Model, though, doesn't give a darn as to what framework/lack thereof is using it. On a database level, it also creates (right now, just MS SQL) scripts to create the various tables used to persist the model. One thing I needed from it was a journaling DB system (where every table is 'threaded', and no rows are actually updated) that lets you roll back versions of an entity, keep an audit log, etc., so the generated persistence components handle this transparently - the App itself is none the wiser to it. It just says RocketService.getWidget(widgetId) and gets the latest version of that widget. While this may (ok, will) increase DB size....hard drives are cheap :). If anyone's interested, I do plan to release this under an LGPL license, but I don't think I'm quite ready for full community involvement. There's still low-level stuff going on in terms of getting things up and running, but I'd be happy to set it up as a community project when it's ready. -Joe ---------------------------------------------------------- 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). CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
