I've seen different approaches to this issue.  There are some
implementations of a "session facade" out there, that encapsulate all
access to the session scope, but I don't really like that idea and
find it kind of pointless.

I prefer to limit the number of objects that have to interact with the
session scope and leave it at that.  For example, in one of my
applications I have a CurrentUser object, which stores some of its
data in the session scope, and that is the only object that interacts
with the session scope in my entire model.  I feel that by doing that
I'm encapsulating access quite well, as if I ever need to change the
way my app is interacting with the session scope (e.g., by changing to
the client scope), I know that I will only have to change one object.

Bob

On Wed, Jan 21, 2009 at 9:07 AM, aliaspooryorik
<[email protected]> wrote:
>
> Hi cfc gurus :)
>
> I have a security system with a login method that stores the user id
> in the session scope. As one of the rules is that objects should only
> know about what is passed to them, is this considered to be an
> acceptable compromise, or do you have specific objects which access
> the session scope (like you have specific classes to access the
> database).
>
> Thanks for your thoughts.
>
> - John
> >
>



-- 
Bob Silverberg
www.silverwareconsulting.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to