Just a suggestion - maybe some of this is usefull -  and this is something
were working on here at the moment with our CFC's

each model cfc extends a base configurable.cfc

Configurable.cfc contains:

variables.config
setConfig( Struct conf )
getConfig(): Struct
init( Struct config )
onInit()

I guess you could implement the same functionality without using inheritance
too.

the idea being when you create objects you pass in the config struct to the
cfc that lives in the application scope. then if that CFC happens to use
composition and requires the same set of config params (DSN being the most
common use, but file paths are another) the onInit() function creates the
components that live inside the orginal and pass on the config as set by the
application.

Pat



"Stephen Milligan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
>
> As a rule model components do not interact with any scopes.
>
> There are two places in the wiki where cfcs from the model read the data
> storage directory from the application scope. Treat those two occurrences
as
> bugs in the way the wiki was coded. The storage directory should be
> explicitly passed into either a constructor init() function, or to each
> function that needs to use it.
>
> I have toyed with the idea of creating a set of 'constants' in the
> application scope that can be read by any component, but so far I haven't
> really needed to do that. Until I find a case where it really causes more
> problems to pass variables than to access them directly I expect I'll
> continue to keep the model layer unaware of any scopes.
>
> Spike
>
>
>
> >-----Original Message-----
> >From: [EMAIL PROTECTED]
> >[mailto:[EMAIL PROTECTED] On Behalf Of
> >Pat Branley
> >Sent: Monday, March 01, 2004 5:55 PM
> >To: CFAussie Mailing List
> >Subject: [cfaussie] Re: BatFink Released...
> >
> >Just having a bit of a look at batfink and one thing that ive
> >noticed is that the model components intereact with the
> >application scope.
> >
> >How does this work from flash ? I was under the impression
> >that you should never reference any external scopes in CFC's
> >incase you may one day want to reference them from a
> >webservice or a flash movie ?
> >
> >Pat
> >
> >
> >
> >
> >
> >"Scott Barnes" <[EMAIL PROTECTED]> wrote in message
> >news:[EMAIL PROTECTED]
> >>
> >>
> >> Heyas
> >>
> >> As most of you probably know, we here up Tourism Queensland
> >eCommerce
> >> Dept, have been using a framework called "BatFink".
> >>
> >> Spike, the beer-o-matic himself is the core brains behind
> >this puppy,
> >> but none the less, most of us understand it, but yeah, download it,
> >> play with it, tell us it sux, tell us it rox, either way
> >we'd love to
> >> see how your initial reaction to it is.
> >>
> >> http://www.mossyblog.com/batfink10.zip
> >>
> >> Its a self-documenting WIKI (well not as hardcore on the docs part,
> >> but its enough to get you started). Its based on the MVP
> >pattern aswell.
> >>
> >> Now go play, thats an order... now MUSH MAGGOTS!
> >>
> >> --
> >>
> >> Regards,
> >> Scott Barnes
> >> -
> >> http://www.mossyblog.com
> >> http://www.bestrates.com.au
> >>
> >>
> >>
> >
> >
> >
> >---
> >You are currently subscribed to cfaussie as:
> >[EMAIL PROTECTED] To unsubscribe send a blank email to
> >[EMAIL PROTECTED]
> >
> >MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
> >http://www.mxdu.com/ + 24-25 February, 2004
>
>
>



---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to