3 ms·
The open closed principle is just a result of a deeper "law", Conway's Law: "organizations which design systems ... are constrained to produce designs which ar
by sunir 12y ago
The open closed principle is just a result of a deeper "law", Conway's Law:
"organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations"-- Melvin Conway (
http://en.wikipedia.org/wiki/Conway's_law http://en.wikipedia.org/wiki/Conway's_law)
Entities should be closed to modification by parties not responsible to maintaining the code. Extension interfaces are used to rationalize the interdepartmental dependencies in a streamlined way that lowers the communications overhead of coordination, negotiation, and control.
That is pluggability reduces having to sit through meetings with agonizing coworkers and being closed avoids having to yell at Bob from three floors down who just borked your code base.
But anyway the bottom line is that the open closed principle is not a principle but merely one common view of organizational design reflected in code architecture.
Conway's law is more important because it is more predictive and more powerful. You can refactor code or the human organization or the communication between people.