concept object - orient principle in category php

appears as: object-oriented principles, object-oriented principles, The object-oriented principles
PHP in Action: Objects, Design, Agility

This is an excerpt from Manning's book PHP in Action: Objects, Design, Agility.

But experience helps. So does considering possible modifications to the design. And so do the object-oriented principles that we will study in chapter 6.

We will go into more detail on a few of these criteria here, although some are better considered from the background of the object-oriented principles.

Design patterns and object-oriented principles may be considered an attempt to provide the free lunch mentioned earlier. Design patterns are an attempt to give a systematic account of successful solutions to problems that are known to recur in program design. It’s easy to overuse them, in which case you might get an expensive lunch, but when properly used they can provide flexibility without making the code much more complex. Sometimes they can even make the program simpler. We’ll explore several design patterns in chapter 7.

Object-oriented principles are less like solutions and more like criteria or guidelines, heuristics that give a rough idea of how easy a design will be to maintain and a starting point for making it better.

The word principle can mean a lot of things to different people, but in our context it means something less detailed and more general than “how-to” type of information. Design patterns are excellent tools, and they are more specific than the object-oriented principles. The difficulty with patterns is not so much the “how-to” as the “when-to”: knowing which situations call for the different patterns is a higher art form. We need to understand what we’re doing and why we’re doing it. The object-oriented principles will help us do that.