oop - What is the meaning and reasoning behind the Open/Closed Principle? -


the open/closed principle states software entities (classes, modules, etc.) should open extension, closed modification. mean, , why important principle of object-oriented design?

specifically, "holy grail" of design in oop of making entity extensible enough (through individual design or through participation in architecture) support future unforseen changes without rewriting code (and without re-compiling **).

some ways include polymorphism/inheritance, composition, inversion of control (a.k.a. dip), aspect-oriented programming, patterns such strategy, visitor, template method, , many other principles, patterns, , techniques of ooad.

** see 6 "package principles", rep, ccp, crp, adp, sdp, sap


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -