O'Reilly logo

PHP in Action: Objects, Design, Agility by Chris Shiflett, Marcus Baker, Dagfinn Reiersol

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. Object-oriented principles

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
6.5 Layered designs 119
6.6 Summary 122

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required