From: Phillip Gawlowski Date: 2011-06-28T19:44:54+09:00 Subject: Re: Single Responsibility Question On Tue, Jun 28, 2011 at 10:57 AM, Robert Klemme wrote: > > Incidentally keeping things as simple as possible often helps with the > robustness as well: the lesser nuts and bolts there are less things > can break and usually the lower the likeliness of things to break. :-) Not to mention: the fastest code is the code that never gets executed, and it's easier to test code that doesn't has to be written, too. ;) > It's always good to keep different aspects separate - that's all > modularity is all about. :-)  And modularity not only enables reuse > but foremost it makes understanding code easier. That's what is behind "composite objects" or "component object model": Instead of building intricate object hierarchies with complex inheritance relationships to gain functionality, you compose your code such that you can "build" your objects from components. Yes, the theory reminded me of Ruby's mixins, too. Here's a link exploring composite objects in greater detail: http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/ P.S.: This is a resend, since SpamAssassin doesn't seem to like me all that much. ;) -- Phillip Gawlowski A method of solution is perfect if we can forsee from the start, and even prove, that following that method we shall attain our aim.                -- Leibniz