|
From: Sean A C. <se...@co...> - 2002-11-08 17:50:22
|
On Thursday, Nov 7, 2002, at 14:22 US/Pacific, Jeremy Firsenbaum wrote: > The attached file starts with=A0an include of initModus.cfm. This file=20= > is responsible for setting the framework=A0up and so must be included = on=20 > every request. I would hope that most developers are=A0using=A0a=20 > methodology that=A0can accomodate global includes. It's simple with=20 > fusebox=A0- you just add=A0it to fbx_settings, but=A0a looser set up=20= > would=A0need to=A0do it some other way. What, like Application.cfm? :) > =A0<!--- Include and parse contentObject descriptors ---> > =A0<cffile action=3D"READ"=20 > file=3D"#application.hardroot#\descriptors\pressrelease.xml"=20 > variable=3D"pressrelease"> > =A0<cfset pressreleasexml =3D xmlParse(pressrelease)> > =A0 > =A0<!--- Register contentObjects ---> > =A0<cfset server.modus.registry.register(pressreleasexml)> Why not just: <cfset server.modus.registry.register(application.hardroot & "descriptors/pressrelease.xml")/> 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. > That should be enough to get things rolling. The registry instantiates=20= > the appropriate facade as defined in the descriptor and passes it the=20= > xml. The facade then instantiates the appropriate modules:=20 > persistence, validation, renderer... and the developer need=20 > only=A0concern themselves with calling the UDF functions.=A0Almost = magical=20 > if you ask me. Yup. > If any of that made sense, then we're getting somewhere. It's becoming=20= > clearer in my own mind=A0as we hash this out - Sean continues to steer=20= > things in a solid direction. I should be able to get a simple=20 > proof-of-concept=A0up and running over the weekend. Let me know what = you=20 > think. Thanx for working on this Jeremy! Sean A Corfield -- http://www.corfield.org/blog/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood |