Greetings,
Can anyone give me (or point me to) a good explanation of what a Session Façade is and what it does? The wiki seems to be down at the moment.
Also, pointers to a good code example would be appreciated.
Thanks.
James Husum, MCCD
Software Engineer III
JIMMS Contract
No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.176 / Virus Database: 270.10.9/1900 - Release Date: 1/18/2009 12:11 PM
Greetings,
Thanks. That helps clear things up some.
Personally, I think the tight coupling to a SessionFacade.cfc argument
is a bit tiresome. I think most people strive for "no coupling" when
thinking of "loose coupling". Honestly, "no coupling" does not exist
because an application has to have *some* dependencies in order to
function. Having a session related helper methods in your Services just
makes you end up using multiple services in other services. It all
depends on how you load data and leverage the session scope. It all
depends on your application and without a lot of information -- it is
six of one and half-dozen of another.
I guess I'm saying there are more than one way to cut a pineapple
(sorry, I just can't bring myself to skin anything these days). Maybe
Mark you might consider denoting some documentation regarding both
techniques at (wink wink):
http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/wiki/UsingSessionFacade
Best,
Peter
We can agree to disagree. :D
> The real thing is there are
> choices -- some ideal more than other and other more ideal due to
> developer experience. Your solution Mark is maybe more sophisticated
> than a general SessionFacade.cfc, however it is less straight forward
> for developers with less architecture experience. However, any solution
> in my mind is better than accessing session.* everywhere.
I agree on the session.* point.
>
> Personally, I think the tight coupling to a SessionFacade.cfc argument
> is a bit tiresome. I think most people strive for "no coupling" when
> thinking of "loose coupling". Honestly, "no coupling" does not exist
> because an application has to have *some* dependencies in order to
> function. Having a session related helper methods in your Services just
> makes you end up using multiple services in other services. It all
> depends on how you load data and leverage the session scope. It all
> depends on your application and without a lot of information -- it is
> six of one and half-dozen of another.
Well, for me not really. I've seen people using a SessionFacade.cfc
all over the place, especially doing things like passing it into
Controllers and/or Transient Objects, and suddenly you're not
encapsulating session usage, you are promoting it! Which becomes
makes your design more fragile due to the high coupling.
The SessionFacade.cfc just becomes a replacement for session.*, but
all you gain is an extra layer of abstraction, without really hiding
away any of the implementation details, above and beyond what session
mechanism you are using. Given the complexity a single
SessionFacade.cfc can introduce, especially once it starts gathering
dependencies, I find it a big 'con' to the 'pro'.
But like you said, it's debatable :D
Mark