© Matt Zandstra 2016

MATT ZANDSTRA, PHP Objects, Patterns, and Practice, 10.1007/978-1-4842-1996-6_8

8. Some Pattern Principles

Matt Zandstra

(1)Liverpool, Merseyside, UK

Although design patterns simply describe solutions to problems, they tend to emphasize solutions that promote reusability and flexibility. To achieve this, they manifest some key object-oriented design principles. We will encounter some of them in this chapter and in more detail throughout the rest of the book.

This chapter will cover the following topics:

  • Composition: How to use object aggregation to achieve greater flexibility than you could with inheritance alone

  • Decoupling: How to reduce dependency between elements in a system

  • The power of the interface: Patterns and polymorphism ...

Get PHP Objects, Patterns, and Practice, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.