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

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

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -