I'd a read of the CFCs best practices primer that we have on the Mach-II wiki:

     ColdFusion Components (CFCs) - A Primer

ColdFusion Components (CFCs) serve as the basis for object-oriented programming (OOP) in CFML. Since Mach-II is an OO-based framework, it is crucial to understand CFCs to be able to use Mach-II successfully. This CFC Primer was created to give developers some background and history of the CFML language from the standpoint of enabling modular application development. The primer also intends to introduce developers to the power of CFCs and why it is important to take advantage of CFCs in building applications.

 * Part 1 - Definition and History
   <http://trac.mach-ii.com/machii/wiki/CFCPrimerPart1>
 * Part 2 - Structure of CFCs
   <http://trac.mach-ii.com/machii/wiki/CFCPrimerPart2>
 * Part 3 - Variable Scopes
   <http://trac.mach-ii.com/machii/wiki/CFCPrimerPart3>
 * Part 4 - Encapsulation and Information Hiding
   <http://trac.mach-ii.com/machii/wiki/CFCPrimerPart4>
 * Part 5 - Using the Person CFC and Summary
   <http://trac.mach-ii.com/machii/wiki/CFCPrimerPart5>



Matthew Woodward said the following on 07/10/2012 05:08 PM:
On Tue, Jul 10, 2012 at 2:51 PM, Jason King <[email protected] <mailto:[email protected]>> wrote:

    will that instance of 'foo' overwrite the instance
    of foo called before the UDF?


Depends on what specifically you're doing and how you've scoped your variables.

    Or are local variables isolated to the
    processing of the UDF, but not included in the document that called
    the function?


Are you var-scoping all your function variables in your CFC or do you have auto-var-scoping turned on?

--
Matthew Woodward
[email protected] <mailto:[email protected]>
http://blog.mattwoodward.com
identi.ca <http://identi.ca> / Twitter: @mpwoodward

Please do not send me proprietary file formats such as Word, PowerPoint, etc. as attachments.
http://www.gnu.org/philosophy/no-word-attachments.html
--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en


--
Peter J. Farrell
OpenBD Steering Committee / Mach-II Lead Developer
[email protected]
[email protected]
http://blog.maestropublishing.com
Identi.ca / Twitter: @maestrofjp

--
online documentation: http://openbd.org/manual/
http://groups.google.com/group/openbd?hl=en

Reply via email to