Peter,
 
[Off Topic]
 
Thanks for the ColdFusion Meetup session today. That was all great info. I'm
still trying to absorb all this OO stuff. Your writings (and now frequent
presos) are a great help. I look forward to playing with your code generator
tools in the future.
 
You are a valuable asset to the CF community.
 
Regards,
 
Josen

  _____  

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter Bell
Sent: Thursday, June 07, 2007 3:44 PM
To: cfcdev@cfczone.org
Subject: Re: [CFCDEV] Application.cfc: where to set DSN


+1. Only thing I put into application.cfc (in terms of a config property) is
application.name which I need to include the framework that calls the
application specific config bean that contains all of the other app specific
config info. Encapsulating it in a config bean gives you a bunch more
flexibility to change how it is created or stored without breaking the API
you expose to the rest of your app.

Best Wishes,
Peter 


On 6/7/07 2:43 PM, "Brian Kotek" <[EMAIL PROTECTED]> wrote:



I suppose the question here is, why not consolodate them all in exactly one
place: a Config CFC?

>From what you said you wouldn't want to set the DSN to application.dsn in
onApplicationStart() becuase then its not variable. I thought you said the
DSN depends on the type of user. So if you're going to keep down this road,
wouldn't you set it to session.dsn in onSessionStart()?



On 6/7/07, Joe Lakey <[EMAIL PROTECTED]> wrote:


This is what I've done in the past, but I'm trying to consolidate these
configuration-type settings into as few places as possible. Setting them
in request scope seems to be the recommended approach. I guess the 
compromise would be setting Application.DSN in onApplicationStart() and
setting request.DSN=Application.DSN in my config file that I include in
onRequest()?

Joe

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
> Of Sammy Larbi
> Sent: Thursday, June 07, 2007 11:43 AM
> To: cfcdev@cfczone.org
> Subject: Re: [CFCDEV] Application.cfc: where to set DSN
>
> Hi Joe,
>
> In my view, a DSN is a variable that properly belongs to an
> application.  Therefore, I'd go with putting it in 
> onApplicationStart,
> since by the very nature of its name, implies that you are setting
> variables belonging to the application.
>
> Others may view it differently, however.
>
> Sam 
>
>
> Joe Lakey wrote, On 6/7/2007 11:03 AM:
> > Another newbie question to provide a little light diversion from
> > interfaces and method overloading...
> >
> > My application uses only one DSN, and I'd like to set it in 
> one place.
> > I'm cfincluding two files in onRequest():
> server_config.cfm, which sets
> > server/environment variables, and app_config.cfm, which sets
> > application-specific variables; both set variables in 
> Request scope. It
> > would seem that one of these includes would be the place to
> set the DSN,
> > i.e., <cfset Request.DSN = "myDSN">. However, in
> onApplicationStart() 
> > and onSessionStart() I'm instantiating components that take
> the DSN as
> > an argument to their init() methods. If I understand the
> sequence that
> > Application.cfc methods are executed, onApplicationStart() and 
> > onSessionStart() won't have access to variables set in
> onRequest(). So
> > if I want to set the DSN in only one place, where is the
> best place to
> > do it?
> > 
> > It's probably obvious (and there's probably a better way to
> architect
> > the whole app to avoid this, but...), but I'm still getting my mind
> > around this OO stuff.
> >
> > Thanks,
> > Joe
> >
> >
> > You are subscribed to cfcdev. To unsubscribe, please follow
> the instructions at http://www.cfczone.org/listserv.cfm
> >
> > CFCDev is supported by:
> > Katapult Media, Inc.
> > We are cool code geeks looking for fun projects to rock!
> > www.katapultmedia.com  <http://www.katapultmedia.com>
<http://www.katapultmedia.com> 
> >
> > An archive of the CFCDev list is available at
> www.mail-archive.com/cfcdev@cfczone.org
<http://www.mail-archive.com/cfcdev@cfczone.org>
<http://www.mail-archive.com/cfcdev@cfczone.org> 
> >
> >
> >
> >
>
>
>
> You are subscribed to cfcdev. To unsubscribe, please follow
> the instructions at http://www.cfczone.org/listserv.cfm
<http://www.cfczone.org/listserv.cfm> <http://www.cfczone.org/listserv.cfm> 
>
> CFCDev is supported by:
> Katapult Media, Inc.
> We are cool code geeks looking for fun projects to rock!
> www.katapultmedia.com  <http://www.katapultmedia.com>
<http://www.katapultmedia.com> 
>
> An archive of the CFCDev list is available at
> www.mail-archive.com/cfcdev@cfczone.org
<http://www.mail-archive.com/cfcdev@cfczone.org>
<http://www.mail-archive.com/cfcdev@cfczone.org> 
>
>


You are subscribed to cfcdev. To unsubscribe, please follow the instructions
at http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com  <http://www.katapultmedia.com>
<http://www.katapultmedia.com> 

An archive of the CFCDev list is available at
www.mail-archive.com/cfcdev@cfczone.org
<http://www.mail-archive.com/cfcdev@cfczone.org>
<http://www.mail-archive.com/cfcdev@cfczone.org> 





You are subscribed to cfcdev. To unsubscribe, please follow the instructions
at http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at
www.mail-archive.com/cfcdev@cfczone.org




You are subscribed to cfcdev. To unsubscribe, please follow the instructions
at http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at
www.mail-archive.com/cfcdev@cfczone.org 


You are subscribed to cfcdev. To unsubscribe, please follow the instructions at 
http://www.cfczone.org/listserv.cfm

CFCDev is supported by:
Katapult Media, Inc.
We are cool code geeks looking for fun projects to rock!
www.katapultmedia.com

An archive of the CFCDev list is available at 
www.mail-archive.com/cfcdev@cfczone.org

Reply via email to