I second James' suggestion..."I facade my remote calls so that the core
object can work like it should".  Google "facade pattern" for more
information.  Whatever you do, do it consistently across the application,
and include good comments so that the next developer doesn't have to suffer.

On Tue, Apr 29, 2008 at 11:28 AM, Brian Kotek <[EMAIL PROTECTED]> wrote:

> On Tue, Apr 29, 2008 at 5:55 AM, Andrew Scott <[EMAIL PROTECTED]>
> wrote:
>
> > Ok....
> >
> > encapsulation is not a rule that you need to adopt, to its fullest. It
> > is a guide.
> >
>
> "Encapsulate by convention, reveal by need" is what I would call a rule
> because it has been demonstrated over and over to offer huge benefits for
> very little cost.
>
>
> >
> > If I choose to use the application scope to reduce memory, and not
> > duplicate varables that is my choice of design. Encapsulation doesn't
> > take that into consideration, however frameworks that are around do.
> >
>
> Reduce memory? You're talking about violating encapsulation to avoid
> creating an instance of a String? I'm sorry, but that's just crazy. Any
> variables of significant size are passed by reference (queries,
> structures,
> component instances, etc.). And if someone has a pass-by-value variable
> that
> is so big that memory is an issue, then there is probably some other major
> design flaw at play. Even in an edge case where such a situation was
> actually valid, that is the exception, not the rule. That's like saying
> it's
> OK for anyone with a vehicle to carry around 10,000 gallons of gas just
> because tanker trucks carry around 10,000 gallons of gas.
>
>
> >
> > I am not going to debate the pros and cons of such a guideline.
> >
> > users need to make up their own mind on what best suits them. In such
> > frameworks as Coldbox and MG:U for example I would use that framework
> > to retireve the information. However if the application I design
> > doesn't require that complexity, then I can and will use the
> > application scope inside a cfc.
> >
> > It is legal and legit, and its my choice to minimise memory in that
> > manner if I or any developer so choose it.
>
>
> No one can argue that. One is surely free to make such a decision. Even if
> 99% of the time it's a bad idea that can be avoided with a tiny amount of
> planning. It doesn't have to be complex at all.
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;192386516;25150098;k

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304406
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to