One additional vote of confidence for you.  Placing a function inside the
applicaiton scope should be fine, but you do need to be careful that you
properly scope any variables inside the function or you could end up with
problems.  Just make sure you please a "var" before any private variables
you create and use inside the function.

-Cameron


On 9/13/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
> Ditto, that's not an "application-scoped" function nor would any params
> used in an Application.cfc or cfm be application-scoped unless they are
> scoped with the application scope ie. application.parameter="frogs" (which
> you can scope anywhere).
>
> Man, thats a lot of scopping.
>
>
>
>
>
>
>   *shawn gorrell <[EMAIL PROTECTED]>*
> Sent by: [EMAIL PROTECTED]
>
> 09/13/2007 02:47 PM   Please respond to
> discussion@acfug.org
>
>    To
> discussion@acfug.org  cc
>   Subject
> Re: [ACFUG Discuss] application-scoped function
>
>
>
>
> That shouldn't be an issue since it won't be reading or writing to shared
> scope variables.
>
> ----- Original Message ----
> From: JON SMITH <[EMAIL PROTECTED]>
> To: discussion@acfug.org
> Sent: Thursday, September 13, 2007 2:16:59 PM
> Subject: [ACFUG Discuss] application-scoped function
>
> Scenario question: Suppose I have a function called calcArea that takes in
> a length and a width and returns a calculated area (it does not change any
> variables; it simply returns a result). I am considering placing it in the
> application scope for ease of use and faster response time. I can find
> online that I need to lock any calls to an application variable to prevent
> race conditions; does that same logic hold true for an application-scoped
> function that simply returns a result as well? Will my application fail out
> if two different users try to call the application-scoped calcArea function
> at the same time without calling a cflock first?
>
>
>
> I realize one function like this could be easily placed in the
> Application.cfm, but if I were to create a full blown object with a few
> dozen calculation functions in it, I would think it would be faster to scope
> it than to recreate the object over and over.
>
>
>
> Any advice appreciated.
>
>
>
> Jon
>
>
>
>
>
> -----------------------------------------
>
> NOTICE: This communication is intended only for the person or
> entity to whom it is addressed and may contain confidential,
> proprietary, and/or privileged material. Unless you are the
> intended addressee, any review, reliance, dissemination,
> distribution, copying or use whatsoever of this communication is
> strictly prohibited. If you received this in error, please reply
> immediately and delete the material from all computers. Email sent
> through the Internet is not secure. Do not use email to send us
> confidential information such as credit card numbers, PIN numbers,
> passwords, Social Security Numbers, Account numbers, or other
> important and confidential information.
>
>
> -------------------------------------------------------------
> Annual Sponsor FigLeaf Software - 
> *http://www.figleaf.com*<http://www.figleaf.com/>
>
> To unsubscribe from this list, manage your profile @*
> **http://www.acfug.org?fa=login.edituserform*<http://www.acfug.org/?fa=login.edituserform>
>
> For more info, see 
> *http://www.acfug.org/mailinglists*<http://www.acfug.org/mailinglists>
> Archive @ 
> *http://www.mail-archive.com/discussion%40acfug.org/*<http://www.mail-archive.com/discussion%40acfug.org/>
> List hosted by *http://www.fusionlink.com* <http://www.fusionlink.com/>
> -------------------------------------------------------------
>
>
>
>
>
> -------------------------------------------------------------
> Annual Sponsor - *Figleaf Software* <http://www.figleaf.com/>
>
> To unsubscribe from this list, manage your profile @ *
> **http://www.acfug.org?fa=login.edituserform*<http://www.acfug.org/?fa=login.edituserform>
>
> For more info, see 
> *http://www.acfug.org/mailinglists*<http://www.acfug.org/mailinglists>
> Archive @ 
> *http://www.mail-archive.com/discussion%40acfug.org/*<http://www.mail-archive.com/discussion%40acfug.org/>
> List hosted by *FusionLink* <http://www.fusionlink.com/>
> -------------------------------------------------------------
>



-- 
Cameron Childress
Sumo Consulting Inc
http://www.sumoc.com
---
cell:  678.637.5072
aim:   cameroncf
email: [EMAIL PROTECTED]



-------------------------------------------------------------
Annual Sponsor FigLeaf Software - http://www.figleaf.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