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? -

visual studio - Deleting lines of code in a text editor -

What's the encoding type of Android 2.2 push message? -