> 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?
> I'm going to bash on this tomorrow and find out myself, but
> if someone can post their reasoning, I'd appreciate it.

If you're using CFCs to implement ideas from object-oriented programming
(separating interface from implementation details, encapsulation, etc), you
want individual objects to be responsible for their own data. CFCs, and OO
programming in general, aren't about performance, they're about modeling
problems in a different (and theoretically better) way than procedural
programming languages allow.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to