Over a million developers have joined DZone.

The Madness of Scrambled Concerns

DZone 's Guide to

The Madness of Scrambled Concerns

· Java Zone ·
Free Resource

You can explain the concept of separation of concerns to a non-technical person in a few minutes. Actually, while almost no one would argue with the importance of SoC, there are a lot of different ways to deal with it. The Single Responsibility Principle , which is attributed to Uncle Bob, is one way. Frankly, this sounds like Meyer‘s notion of components only advancing a single interface constrained as much as possible.

The problem with Uncle Bob‘s formulation is it defies the central feature of reality: complexity. Show me a problem where we can make all responsibilities singular, that is not a hello world. That‘s not to say that every act of design is responsible for accounting for all possibilities, it‘s just to say that every piece of code that you think has successfully enclosed its responsibility is actually encapsulating more than one responsibility. Now, the Meyer argument would be that the singularity need only be on the interface. In other words: make sure the component only does one thing for others, no matter how many things it must do to assure that contract.

Does it seem like all manner of following this fundamental concept has just dropped like a mantle? We have annotations in domain classes now that have directives for the database in them. In the Neo4J universe, which I am still pretty enamored of, they suggest that you wrap your domain classes around their node class. That‘s like totally kookoo for cocoa puffs.

The Yegge rant comes to mind: here‘s a different take on it: Bezos, the non-engineer, sees the logic of interfaces at every joint and node and mandates them in an edict because he knows that, though the ‘engineers‘ probably also understand the logic of it all, they are too mired in their own bs to follow their own commandments. How in hell can that be denied? The only remaining question is can our obvious incontinence a function of blubbering incompetence or is there a conspiracy version here? Of course, my argument is that the open world has officially jumped the Orwellian Wall and is so ludicrously contradictory it‘s frankly laughable. Their commandments are ‘standards! closed is evil! don‘t get chumped,‘ followed by ‘download our new EE 6 bundle!‘ then later.. ‘oh, you want to use it? ok, well download the other half of the offering that isn‘t covered by standards and try not to dwell on the fact that you are a single vendor freebasin‘ fool…‘


From http://www.jroller.com/robwilliams/entry/the_madness_of_scrambled_concerns


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}