On Wed, Aug 4, 2010 at 10:37 PM, Dan Skaggs wrote: > You mentioned that Ray Camden named his facade object scopeFacade.cfc. Like > you, I've seen a lot of people name it SessionFacade.cfc (and I've done it in > the past myself). There's no harm in naming it SessionFacade.cfc even if > later you change the internal workings of it to use the client scope rather > than the session scope. The reason I like Ray's naming choice on that is that > it's generic enough to be applicable no matter if you're using session, > cookie, client or whatever scopes while, if a new person to your application > looks at the code base and sees a component named SessionFacade.cfc he/she > will most usually assume that whatever is going on in there utilizes the > session scope and that might not be correct.
*** I have a different take on this. For scope facades, I use a ScopeFacade.cfc, but I give the object a name and a scope (sessionFacade (bean ID) usually gets session, unless I'm unit testing). My thinking is this (I'm not saying it's right headed- I sometimes think it's swell and at others... not so swell): The important thing about the session isn't *where* it's actually stored, but what it represents. As in, yes, the Future Programmer /should/ assume that what goes in there is stuff for the session. Not necessarily going into the session scope itself- that's why it's called SessionFacade and not Session... or something along those lines. But I dunno. Before anyone says "hey that sounds swell" and runs off and changes code, maybe this isn't as good as being more abstract. And even if it turns out to be a good idea, my intention of mentioning this is just for discussion, not to try to induce paralysis (Id est: "hey, I should go refactor code instead of creating newness!"). =) :Den -- All good things which exist are the fruits of originality. John Stuart Mill -- Model-Glue Sites: Home Page: http://www.model-glue.com Documentation: http://docs.model-glue.com Bug Tracker: http://bugs.model-glue.com Blog: http://www.model-glue.com/blog You received this message because you are subscribed to the Google Groups "model-glue" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/model-glue?hl=en
