I use XML (as stated before) but for this single purpose, I agree with Charlie 
that it would be much simpler and just as affective to use the INI file 
functionality built into CF.  You will use half the lines of code to do that vs 
the XML option.

Still, XML is a nice buzz word and if you want to use this as a reason to get 
familiar with reading and parsing XML files, then great!  It is a great 
standard to use for sharing data between systems.  However, again, if the 
purpose is to just read some params in and set application vars, I think the 
ini option Charlie suggested would be best.  I even thought about rewriting my 
system to use the ini rather than the XML.  It would reduce the settings file 
to about 30 lines (60% reduction)  and be MUCH easier to read than my XML.

There is no real answer to which is the "best" option for you.  They are both 
great.

<salute>

Wes

From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Charlie Arehart
Sent: Wednesday, November 04, 2009 10:59 AM
To: discussion@acfug.org
Subject: RE: [ACFUG Discuss] Development vs Production Application.cfm and 
other things...

Ajas, you mention some loving/some hating XML files. I didn't see any reply 
from you on my note offering yet another alternative (sent 10/24), where I said 
simply:

"Or one may find it a little easier to use ini files, and CF's functions to 
read them (added in CF 6), such as getprofilestring, getprofilesections, 
setprofilestring."

I'm not knocking any of the solutions you found, nor do I have any hatred 
toward XML myself, but I would again argue that for some uses it would 
definitely be "easier" than XML. :-) Not as robust or flexible, no. But if you 
just want to read in a few strings that would vary in the implementation of 
such an ini file would really suit the purpose well. It's just one of the many 
easily missed features that CF offers.

Not trying to stop you following the other approaches. Just want to make sure 
folks are aware of the alternative. :-)

/charlie

From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Ajas Mohammed
Sent: Tuesday, November 03, 2009 8:42 PM
To: discussion@acfug.org
Subject: Re: [ACFUG Discuss] Development vs Production Application.cfm and 
other things...

Thank you everyone. The suggestions  from everyone were very helpful. Using the 
suggestions helped me come across these links

http://environmentconfig.riaforge.org/

http://learn.objectorientedcoldfusion.org/wiki/Managing_Multiple_Environment_Configurations

http://tutorial304.easycfm.com/

http://www.coldfusionjedi.com/index.cfm/2005/9/2/ColdFusion-101-Config-Files-AGoGo-Part-2-XML-Files

Looks like more people are using or prefer XML. I did see some ppl show hatred 
towards XML which is very hard to understand. You would think xml is the 
simplest way of storing data or doing things like this. Personally, I would 
prefer XML as its easy to work with.

Thanks all,

<Ajas Mohammed />


-------------------------------------------------------------
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform

For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink<http://www.fusionlink.com>
-------------------------------------------------------------



-------------------------------------------------------------

To unsubscribe from this list, manage your profile @ 

http://www.acfug.org?fa=login.edituserform



For more info, see http://www.acfug.org/mailinglists

Archive @ http://www.mail-archive.com/discussion%40acfug.org/

List hosted by http://www.fusionlink.com

-------------------------------------------------------------


Reply via email to