best served by just the key stored in the session scope (i.e. the iso
code, or how the locale is identified). Then a UI cfc in the app scope
could get the locale-based ui-element names, for instance.
I think it is much clearer by an example where the CFC models a
"real-world object". A shopping cart for instance. The cart.cfc is
instantiated at the beginning of the session, and is gone by the end of
it (it is of course possible to make it persistant between the sessions
as well). During the session the cart is (hopefully) manipulated by
accessing various methods and properties.
By using the "Session Facade" pattern, the cart.cfc can be ignorant on
what scope it is in.
See Sean Corfields development guide for Mach-II for a little more
information (the above info is bascially from there). I think I also
read a Sun page about that pattern -- I am no OO specialist! :)
/Hugo
-------------------------------------------------------------
Hugo Ahlenius E-Mail: [EMAIL PROTECTED]
Project Officer Phone: +46 8 230460
UNEP GRID-Arendal Fax: +46 8 230441
Stockholm Office Mobile: +46 733 467111
WWW: http://www.grida.no
-------------------------------------------------------------
| -----Original Message-----
| From: Paul Hastings [mailto:[EMAIL PROTECTED]
| Sent: Tuesday, February 03, 2004 05:38
| To: CF-Talk
| Subject: Re: CFC or Struct in session
|
| > I've been reading in a number of places where people place
| a reference
| > to
| a CFC in a users session variable. This has always seemed
| strange to me. Why not cache the CFC for the application and
| only store the users data in a session struct. Is there
| something I'm missing about saving an entire CFC reference
| per user? Doesn't it have a higher overhead? Is there a
| performance savings?
|
| well if you're storing some data/function specific to that
| user it makes perfect sense, say pulling in locale specific
| resources (resource bundles, culture-specific formatting,
| etc.) on a multi-lingual website for instance.
###########################################
This message has been scanned by F-Secure Anti-Virus for Microsoft
Exchange.
For more information, connect to http://www.F-Secure.com/
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

