I read that he wanted a way to insure that app-scope vars would exist at the 
right names across several separate folders.

Or, you could do what Sean Corfield blogged about a while ago:

/appProxy.cfc
/Application.cfc extends="appProxy"
/admin/Application.cfc extends="appProxy"

That would, from a CFC development standpoint be EXACTLY the same as 
cfincluding Application.cfm, except for the fact that with CFCs and the 
extends attribute you can do things like calling super.onSessionEnd() in 
your onSessionEnd() method (which means your calling the parent's version 
from the child version...)(that was for others, Isaac, not you *g*)

So you code appProxy.cfc as you normally would your Applicaiton.cfc and use 
it for the base class for your other Application.cfcs.

And for that matter, if you REALLY wanted, you could write an 
application.cfc that looks like this:

<cfinclude template="/application.cfc" />

But that's pretty darned messy.

HTH,
J

On 7/8/05, S. Isaac Dealey <[EMAIL PROTECTED]> wrote:
> 
> The Application.cfc in the nested directory will omit the
> Application.cfc code in the parent directory... this means that much
> of the code to set these variables would need to be duplicated in both
> cfc's. What I read (and I could be misinterpreting) is that he wanted
> a way to eliminate the need to duplicate that code.
> 
> > Will...
> 
> > In your first application.cfc you're going to create
> > application.dsn, right?
> > Along with this.name <http://this.name> <http://this.name>, yes?
> 
> > So your second application.cfc is going to have this.name<http://this.name>
> > <http://this.name>as well, yes? And if it's the same
> > string as the
> > name in the first
> > application.cfc, it's going to be looking at the same
> > application space as
> > the first one.
> 
> > So, in your first application.cfc you create
> > application.dsn = "mydsn"... so
> > long as they're running on the same server it's going to
> > see the same values
> > under the same names in the application scope.
> 
> > In other words you join the data in memory by the name
> > specified in the
> > space inside the cfcomponent tag and outside any of the
> > cffunction tags...
> > by giving them the same name you join them logically in
> > the server's memory.
> > It's effectively the exact same thing as cfincluding an
> > Application.cfmfile, but different in implementation.
> 
> 
> s. isaac dealey 954.522.6080
> new epoch : isn't it time for a change?
> 
> add features without fixtures with
> the onTap open source framework
> 
> http://www.fusiontap.com
> http://coldfusion.sys-con.com/author/4806Dealey.htm
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:211443
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to