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
As with any variable, it's really a case-by-case basis.
Will all users of the app have frequent need for this variable/CFC?
Application scope.
Will all users of the app have frequent need for this variable/CFC
specifically for them? Session scope.
Will you just use it every so often?
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
3 matches
Mail list logo