On 11/23/05, Robert Everland III <[EMAIL PROTECTED]> wrote:
> I understand that CFC's are just like any other variables. My question is, 
> why? I have used CFC's mostly to put functions that are used throughout an 
> application into the application scope.

You're using CFCs as a way to wrap up related functions (which is fine
but not what objects are all about).

> So what would you put a CFC into a session scope for? What is that person 
> doing different that makes it necessary to put it into a session.

A shopping cart CFC wraps up data (what's in the cart) and functions
(add / remove items from the cart) and something like that would
typically live in session scope. Similarly for a user CFC (user data +
functions that operate on it).

As for client scope, I disable it by default as part of server setup
(i.e., set the default client storage to none - and none of my apps
use client scope). I use J2EE session variables instead so that
persistent cookies are not automatically created and stored on the
user's computer. I also use sticky session so I don't have to deal
with session replication (network overhead if you have a lot of
sessions with active data).
--
Sean A Corfield -- http://corfield.org/
Got frameworks?

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

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225139
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to