|6.1||Principles and patterns||103|
|6.2||The open-closed principle (OCP)||105|
|6.3||The single-responsibility principle (SRP)||109|
|6.4||The dependency-inversion principle (DIP)||115|
Once there was a large, heavy, complex web application with lots of modules, bells and whistles, or even timpani and trumpets. It was reasonably successful, but needed to be adapted to a new customer’s needs. The customer needed something with fewer features but with a specific look and feel. The look and feel was well defined: There was an HTML file containing all the styling and layout that was needed.
The existing application had flexibility built in so that a web designer could change the layout ...