On 10/29/07, Brian Kotek <[EMAIL PROTECTED]> wrote: > And since I have never run into a situation where different > services needed to use different persistence mechanisms
I have. One day you will too. <peeve>And it's not "persistence" - memory is not persistent by definition, disk-based systems are persistent.</peeve> > If one had direct references to the SessionFacade all over their code, I'd > agree with you. Which is what most people do and that's why I'm making a fuss! I'm reviewing an application right now that has a sessionFacade containing nearly 80 methods for all sorts of random stuff and consequently they have references to sessionFacade all over their code. If you're using it as a simple get/set facade and injecting it directly into your services and then only using it within one or two methods, that addresses part of my complaint but now you've created an artificial coupling between classes - your services all become dependent on the facade and are all tied to the same shared scope handling. You've introduced an extra layer of abstraction for no real benefit - the service still refer to "session" (as the name of a component); you've introduced a (slight) performance overhead and you no longer have granular control over how the data is stored. There is a trade off here (of course) and I'll argue that having a single method inside a service that encapsulates use of session scope is better encapsulation than having the service depend on an external class that lots of other components also depend on. -- Sean A Corfield -- (904) 302-SEAN An Architect's View -- http://corfield.org/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Enterprise web applications, build robust, secure scalable apps today - Try it now ColdFusion Today ColdFusion 8 beta - Build next generation apps Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292304 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4