On Wednesday, Jul 30, 2003, at 01:29 US/Pacific, Tim Blair wrote:
The question I had was regarding the fact that the objectStore itself
references a shared scope (the application scope) so even if I pass
around a reference to that object (which is how I'm doing it) then the
object "using" the objectStore will indirectly be using the application
scope via the objectStore...

If you're placing an instance of the objectStore in application scope, I'm not sure why it needs to reference application scope itself - it will be able to store instance data which will, in turn, be already application scope.


It sounds like you'd break encapsulation by directly referencing application scope inside objectStore. Could you explain what it's doing that it needs to do that?

If an object in a shared scope needs to reference other objects in the same (or other) shared scopes, it's probably better practice to 'register' those objects with it after creation than have it 'know' about their existence in other shared scopes.

By doing that (registration) it would allow your objectStore to be used as easily in server scope or session scope if that was more appropriate to someone's needs...

One of the (few) places where a CFC will need to know about a shared scope is when you create a stateless fa�ade that manages instances in, say, session scope such as you might need for a Flash-based RIA. Such stateless fa�ades might also manage cached data in a shared scope.

Sean A Corfield -- http://www.corfield.org/blog/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev'
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

Reply via email to