In general you should separate object creation from object use. That means using factories to create your objects. ColdSpring can do this, or you can create your own factories.
Storing CFC instances in the session and application scopes depends on what the object's function is. It also requires particular care in writing the code as storing CFCs in persistent scopes means you have to be aware of race conditions and concurrency issues. An application that uses CFCs "really well" is probably subjective. I have code from my Frameworks Conference available on my blog that you might find helpful at: http://www.briankotek.com/blog/index.cfm/2007/2/4/Frameworks-Presentation-and-Code-Available Another is MachBlog at http://www.machblog.org/ Hope that helps. On 8/1/07, Chad Gray <[EMAIL PROTECTED]> wrote: > > Is there a best practice when creating an object? > > Do you store your objects in the session or application scope so you can > use it through out the application? Or do you create your objects only when > you need to? > > I suppose it is a case by case decision. > > Is there an application out there that uses CFCs really well and I should > look at how that application is written? > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:285087 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

