>OOPS!. Forgot to mention.. this a Responsibility Driven MVC >Design - takes >after Jakarta Structs. >
Unless I'm misunderstanding you, that shouldn't make any difference. >All Modules/CFC's are dynamically executed by a RequestManager. > >The Controller initializes all the Data Caching as soon as the >application >is initialized. >All CFC's have an init() method. In this case. > >Products.cfc > >init(){ >variables.instance = structNew(); >instance.prdData = application.appMainDataStore.getProductsCache(); >} > That should be: init(datastore) { variables.instance = structNew(); instance.prdData = arguments.datastore.getProductsCache(); } It should also probably be done using cffunction so you can specify stuff like returnType, hint, access, roles etc. if you ever need to, but that's a bit of a contentious one with a lot of people and not really relevant to the question you asked. The Controller should probably get the datastore from a façade that handles all access to the application scope, or it may itself be the façade. The idea being that if you ever change how or even if you cache the datastore that is the _only_ place you need to worry about making changes. With your method, it is very possible to forget about one of the places where the application scope is directly referenced. That leads to increased maintenance overhead. Having said that, creating a façade is an initial overhead so, as with most things, it's a trade off that only you can fully evaluate. Spike -------------------------------------------- Stephen Milligan Code poet for hire http://www.spike.org.uk Do you cfeclipse? http://cfeclipse.tigris.org ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]