|
From: Jeremy F. <jfi...@ma...> - 2002-11-08 18:46:37
|
On Thursday, Nov 7, 2002, at 14:22 US/Pacific, Jeremy Firsenbaum = wrote: > The attached file starts with an include of initModus.cfm. This file = > is responsible for setting the framework up and so must be included = on=20 > every request. I would hope that most developers are using a=20 > methodology that can accomodate global includes. It's simple with=20 > fusebox - you just add it to fbx_settings, but a looser set up=20 > would need to do it some other way. What, like Application.cfm? :) Ok Sean - you've got me cracking up on this one. I've been doing = fusebox for so long (one gets stuck in a conceptual as well as technical = framework), and Application.cfm is basically off limits for fusebox = "best practices." Wow, I'm blushing over having forgotten that one. Why not just: <cfset server.modus.registry.register(application.hardroot & "descriptors/pressrelease.xml")/> Yes - I addressed this in a later email yesterday - but (see below) this = won't even be necessary. Have the register() function read and parse the XML - less for the=20 developer to do. I'd probably go further and have a fixed=20 initialization file (XML) that the system finds 'automatically',=20 perhaps based on the location of Application.cfm, that lists all the=20 types that the system will use. Again, just syntactic sugar. I didn't want to mention it until I got something working (so as not to = add to the confusion), but I do think there should be a single = application settings file: modus.xml. It basically provides the mappings = to the descriptors and is also a great place for global defaults like = persistence type.and db source name (if needed)... The only thing a = contentObject developer will need to touch is the descriptor files. The = only thing a Modus user will need to touch is the modus.xml file to = register the contentObjects. So long as the include of initModus.cfm is = put into Application.cfm (a powerful new feature of coldfusion that I've = just invented by the way) the whole system initializes itself. Just a note - I've basically got the persistence layer running as a = service. The existing code base is proving quite simple to port. Thanks = for all of the hard work Nathan, I should be sharing something soon and = look forward to your feedback. -Jeremy |