Re: using an xml file for cfc settingsray style

2005-09-20 Thread Will Tomlinson
>Okay, this is long, but here's some example code. Here's the dbdata >(settings) cfc. You'd fill in "(yourdefault)" with whatever your default >info is: Thanks much Deanna! This indeed helps a lot. I'll be working on it tonight. :) Will ~~~

Re: using an xml file for cfc settingsray style

2005-09-20 Thread dave
ED]> Sent: Tuesday, September 20, 2005 8:26 AM To: CF-Talk Subject: Re: using an xml file for cfc settingsray style Okay, this is long, but here's some example code. Here's the dbdata (settings) cfc. You'd fill in "(yourdefault)" with whatever your default in

Re: using an xml file for cfc settingsray style

2005-09-20 Thread Deanna Schneider
The advantage of an object is that we have multiple applications that all use this data. By putting it in an object, we can use the same data over multiple objects, and more importantly, we can store the default data outside the web root. We certainly have a lot of code out there that does what

Re: using an xml file for cfc settingsray style

2005-09-20 Thread Michael Traher
or whether you read mydsn etc. from an init file, from XML, or maybe derive it from the host name is subject to debate. However surely storing this data in an object is just overly complicating something that can be simple? Mike T ~~~

Re: using an xml file for cfc settingsray style

2005-09-20 Thread Deanna Schneider
Okay, this is long, but here's some example code. Here's the dbdata (settings) cfc. You'd fill in "(yourdefault)" with whatever your default info is: variables.dsn = ""; variables.username = ""; variables.password = ""; setDSN(arguments.dsn); setUsername(arguments.username); setPasswor

RE: using an xml file for cfc settingsray style

2005-09-19 Thread Andy
ubject: Re: using an xml file for cfc settingsray style We create a Config object that wraps up all these sorts of settings (DSN name, table aliases, application settings, etc.) and then just pass that Config object into whatever other CFCs need acce

Re: using an xml file for cfc settingsray style

2005-09-19 Thread Will Tomlinson
a! Now we're gettin' somewhere! I was just thinking about doing it like this because I'm looping through and creating separate app variables with the settings' values. But if I build a settings struct that can be passed into the cfc, it would be mucho better. The problem I have someti

Re: using an xml file for cfc settingsray style

2005-09-19 Thread Raymond Camden
I won't say this is "best" by any means - however, what I like to do lately (and you may not see this in Galleon, or BlogCFC), is simply pass a struct to all my CFCs. The struct contains all my settings. So my init functions in the CFCs will take one arg, a structure. That data is copied to the Var

Re: using an xml file for cfc settingsray style

2005-09-19 Thread Will Tomlinson
(So, if we had a cfc >that needed username, dsn, etc, we'd require that it be passed into an init >function - the cfc doesn't know that the application scope exists.) > >Make sense? Yes this makes good sense, but I think what would help most is if you could show us some *REALLY* basic example c

Re: using an xml file for cfc settingsray style

2005-09-19 Thread Deanna Schneider
You can also have a settings CFC that's accessible to both apps. You can "hard code" the needed vars in the settings cfc as variables, but allow them to be overwritten on initialization and then require an instance of the settings cfc for each of your other cfcs. When I do this, I place the set

Re: using an xml file for cfc settingsray style

2005-09-19 Thread Brian Kotek
We create a Config object that wraps up all these sorts of settings (DSN name, table aliases, application settings, etc.) and then just pass that Config object into whatever other CFCs need access to them. On 9/18/05, Andy <[EMAIL PROTECTED]> wrote: > I SET some of the application variables in eac

Re: using an xml file for cfc settingsray style

2005-09-19 Thread Ryan Guill
Im not sure what your questions/problems are? I have used an xml config file for a while now and its not difficult. Are you asking how to work with xml or is it more of an architecture question? If you have one set of datasources and other resources that multiple sites and systems will be using,

Re: using an xml file for cfc settingsray style

2005-09-18 Thread dave
l Tomlinson <[EMAIL PROTECTED]> Sent: Sunday, September 18, 2005 8:07 PM To: CF-Talk Subject: Re: using an xml file for cfc settingsray style Can we please get some more input on this topic guys? I'd just like to know how some o

Re: using an xml file for cfc settingsray style

2005-09-18 Thread Kym Kovan
Will Tomlinson wrote: > Can we please get some more input on this topic guys? I'd just like to know > how some of you handle these things. Umm, we are still use ini rather than xml files but the overall architecture is much the same. A lot of our sites use code that dates back to CF 5 or even 4

Re: using an xml file for cfc settingsray style

2005-09-18 Thread Will Tomlinson
Can we please get some more input on this topic guys? I'd just like to know how some of you handle these things. Thanks, Will ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.h

RE: using an xml file for cfc settingsray style

2005-09-18 Thread dave
use at the same time." From: "Andy" <[EMAIL PROTECTED]> Sent: Sunday, September 18, 2005 3:29 PM To: CF-Talk Subject: RE: using an xml file for cfc settingsray style Wow, I just read what I wrote...it is like English but different. But if you lower your intelligence by a

RE: using an xml file for cfc settingsray style

2005-09-18 Thread Andy
Sunday, September 18, 2005 4:38 PM To: CF-Talk Subject: Re: using an xml file for cfc settingsray style >Wow, I just read what I wrote...it is like English but different. But if >you lower your intelligence by a few notches, you just might get the jist. >Sorry. I've been testing diffe

Re: using an xml file for cfc settingsray style

2005-09-18 Thread Will Tomlinson
>Wow, I just read what I wrote...it is like English but different. But if >you lower your intelligence by a few notches, you just might get the jist. >Sorry. I've been testing different ways of doin this. Ray tipped me off to a new feature of XMLParse() in mx7 which lets you use filenames and u

RE: using an xml file for cfc settingsray style

2005-09-18 Thread Andy
: using an xml file for cfc settingsray style Dave, I have just started to use XML for file settings, so take this as a bigger's stab. I have about 80 lines in my application.cfc that sets things like file locations, menus, security context, etc. I am in the process of moving them into XML files

RE: using an xml file for cfc settingsray style

2005-09-18 Thread Andy
Dave, I have just started to use XML for file settings, so take this as a bigger's stab. I have about 80 lines in my application.cfc that sets things like file locations, menus, security context, etc. I am in the process of moving them into XML files, one for each environment (dev, test, producti