>Unless I'm misunderstanding you, that shouldn't make any difference.

It is almost impossible to make CFC method calls dynamic. That is every
method is called with different types of arguments. The actions are mapped
to CFC Object/methods and i dont think it is possible to dynamically execute
methods with different arguments based on the XML Config Params.
i.e XML Mapping
<?xml....
 <ActionMaping  action="myAction" dataClases="Products" aguments="request,
form, url, application.appMainDataStore"/>

Also a given module only needs a few instance variables in the Cache.

>With your method, it is very possible to forget about one of the places
>where the application scope is directly referenced.

Application scope variables are NOT directly referenced, they are returned
by
a method catering this specifc Module/CFC.

Products.cfc (assume <cfunction....)

init(){
structAppend(instance.prdData,
application.appMainDataStore.getProductsCache());
//Your implementation would look like
structAppend(instance.prdData, arguments.myArgName.getProductsCache());
}

getProductsCache() returns a struct of variables from the Cache.
so you will have
instance.prdData.states['USA'] = "All US States Parsed into option tags"
instance.prdData.states['CAN'] = "ALL Canadian Provices"

I dont know of any ColdFusion MVC's that would dynamically execute all the
CFC's for you
with dynamic parameters coded in configuration files. This is a huge
advantage towards
streamlined development when you have a big Team of developers.

Maybe i am missing something.

Joe Eugene


>-----Original Message-----
>From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Behalf Of Spike
>Sent: Thursday, July 15, 2004 5:29 PM
>To: [EMAIL PROTECTED]
>Subject: RE: RE: [CFCDev] using cfinclude within components (was
>Serializationof CFCs)
>
>
>>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]

----------------------------------------------------------
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]

Reply via email to