Jamie - 

It depends on what you are using the component for.

If it is something that runs a service - like querying a database to get a series of 
results, or something similar, it makes sense to put something like that in the 
application scope.  That way you lose the overhead of creating the CFC every time you 
use it, and can just access it directly.

However, you could also use a CFC to represent an abstract object, like a data 
record - i.e. a Document CFC etc - and whether or not you persist it or not is 
dependent on your application design.

But a good rule of thumb is - 'Will users be creating multiple copies of this CFC 
across my application, when accessing the same one would provide the same results?'.

If the answer is 'Yes', there is no reason not to persist it.

I hope that helps.

Mark

------------------------------------------------------------------
[EMAIL PROTECTED]
ICQ: 3094740
Safe From Bees
[ www.safefrombees.com ]


Quoting Jamie Lawrence Jenner <[EMAIL PROTECTED]>:

> Within kmy current app i create component objects as they are needed,
> invoke the required method.
> 
> Is it best to create the component objects within the application, request
> or session scope, instead of creating them 'on the fly' as it were.
> 
> cheers 
> 
> jamie
> 
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to [EMAIL PROTECTED]
> 
> MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
> http://www.mxdu.com/ + 24-25 February, 2004
> 
> 
> 

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to