How will Patterns Help in Design?
There are several design principles that patterns
help enforce.
-
program to an interface, not to an implementation
Interface is a set of operations, no implementation
-
favor object composition over class inheritance
dynamic, easily changed at run-time
-
encourage centralization of replicated decision-making code
having control logic scattered and replicated is a recipe for
mistakes when code is altered