FWIW, I am creating application objects
in application.cfc
application.Order = createobject("Component",
#application.ComponentsLocation# & "Order");
this way CF doesn't have to create and
destroy these static objects all the time.
For development this doesn't work so well
because you'd have to reload your application
vars every time you change one of these static
cfc's. To help with that, I have defined
an OnRequestStart function that does this.
There is of course a performance penalty,
but for dev that doesn't matter:
<!--- this resets all application
vars for every page request. Do this in dev
only! --->
<cffunction name="OnRequestStart" returntype="void"> <cflock scope="Application" timeout="10" type="exclusive"> <cfinvoke component="YourWebSiteRoot.Application" method="onApplicationStart" returnvariable="Foo"></cfinvoke> </cflock> </cffunction>
HTH
/m
: I like to keep the application.cfc the same and use an XML file to store the : application variables and their values that differ on each machine. So, in : the application.cfc on application start, you can execute a component that : can parsethe XML and set application scope vars accordingly. : : Wes : : : From: ad...@acfug.org [mailto:ad...@acfug.org] On Behalf Of Ajas Mohammed : Sent: Saturday, October 24, 2009 3:53 PM : To: discussion@acfug.org : Subject: [ACFUG Discuss] Development vs Production Application.cfm and other : things... : : Hi, : : : : Just wondering if anyone can share there Development vs Production : Application.cfm or .cfc techniques. If you have a sample application.cfm or : .cfc file to share, then that would be great. : : : : I will give some background as to how I am doing this right now. I usually set : application variables which of course, have different values in : development vs production. Best example is pathtoSomething application : variable's value which would be different in development and production. : : : : Any other advices are also welcome. : : : : Thanks, : : : : Ajas Mohammed. : : : Mischa Uppelschoten VP of Technology The Banker's Exchange, LLC. 4200 Highlands Parkway SE Suite A Smyrna, GA 30082-5198 Phone: (404) 605-0100 ext. 10 Fax: (404) 355-7930 Web: www.BankersX.com Follow this link for Instant Web Chat: http://www.bankersx.com/Contact/chat.cfm?Queue=MUPPELSCHOTEN ----------------------- Original
Message -----------------------
From: Wes Byrd <w...@dynapp.com>
Date: Sat, 24 Oct 2009 17:02:46
-0500
Subject: RE: [ACFUG Discuss]
Development vs Production Application.cfm
and other things...
I like to keep the application.cfc
the same and use an XML file to store the
application variables and their values that
differ on each machine. So, in the
application.cfc on application start, you
can execute a component that can parse the
XML and set application scope vars accordingly. Wes From:
ad...@acfug.org [mailto:ad...@acfug.org]
On Behalf Of Ajas Mohammed Hi, Just wondering if anyone
can share there Development vs Production
Application.cfm or .cfc techniques. If you
have a sample application.cfm or .cfc file
to share, then that would be great.
I will give some background
as to how I am doing this right now. I usually
set application variables which of course,
have different values in development
vs production. Best example is pathtoSomething
application variable's value which would
be different in development and production. Any other advices are
also welcome. Thanks, 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 ------------------------------------------------------------- ------------------------------------------------------------- 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 ------------------------------------------------------------- |
- [ACFUG Discuss] Development vs Production Application.... Ajas Mohammed
- RE: [ACFUG Discuss] Development vs Production App... Wes Byrd
- RE: [ACFUG Discuss] Development vs Production... Charlie Arehart
- re[2]: [ACFUG Discuss] Development vs Product... Mischa Uppelschoten
- Re: [ACFUG Discuss] Development vs Production App... Jim Rising
- [ACFUG Discuss] My CFBuilder Hidden Gems talk... Charlie Arehart
- Re: [ACFUG Discuss] My CFBuilder Hidden G... Mike Staver
- RE: [ACFUG Discuss] My CFBuilder Hidd... Charlie Arehart
- [ACFUG Discuss] Javascript acros... Mischa Uppelschoten
- Re: [ACFUG Discuss] Javascri... John Youngman
- Re: [ACFUG Discuss] Java... Dean H. Saxe
- re[2]: [ACFUG Discuss] J... Mischa Uppelschoten
- Re: re[2]: [ACFUG Discus... Dean H. Saxe
- Re: [ACFUG Discuss] Java... Dean H. Saxe