Henry, you seem to be missing the fact that a "super abstract example" is
exactly the kind of example that will not work if you want advice. It would
most likely be terrible if ObjectA had 40 methods, 30 of which did nothing
but delegate calls to methods in Objects X, Y, and Z. This would be an
example of the "Middle Man" antipattern, and it means the design is flawed.

On Tue, Feb 17, 2009 at 4:26 PM, Henry Ho <[email protected]> wrote:

> No, I'm sorry this is not a real app.  I am building something else, but I
> don't think it is appropriate for me to post the actual software model we're
> working on at work.  I'm not sure if my client will be okay with me asking
> on a public mailing list.
>
> Although the Room / Window example sounds ridiculous on the surface, it is
> where the methods should be placed that puzzled me.
>
> To use a super abstract example, it'll be like..
>
> 1 ObjectA has an ObjectX, ObjectY, and ObjectZ.
>
> ObjectX, ObjectY and ObjectZ have n public methods each (where n may be =
> 10+).
>
> If I push all behaviors onto ObjectA, then A will have all 30+ public
> methods (+ its own).  Yes, we'll respect the Law of Demeter, and no one will
> know ObjectA really has ObjectX/Y/Z, but wouldn't ObjectA become super fat?
>
>
> Regards,
> Henry Ho
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" 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/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to