Build server-side applications more efficiently—and improve your PHP programming skills in the process—by learning how to use design patterns in your code. This book shows you how to apply several object-oriented patterns through simple examples, and demonstrates many of them in full-fledged working applications.
Learn how these reusable patterns help you solve complex problems, organize object-oriented code, and revise a big project by only changing small parts. With Learning PHP Design Patterns, you’ll learn how to adopt a more sophisticated programming style and dramatically reduce development time.
* Learn design pattern concepts, including how to select patterns to handle specific problems
* Get an overview of object-oriented programming concepts such as composition, encapsulation, polymorphism, and inheritance
* Apply creational design patterns to create pages dynamically, using a factory method instead of direct instantiation
* Make changes to existing objects or structure without having to change the original code, using structural design patterns
* Use behavioral patterns to help objects work together to perform tasks
* Interact with MySQL, using behavioral patterns such as Proxy and Chain of Responsibility
* Explore ways to use PHP’s built-in design pattern interfaces
Inhaltsverzeichnis
Dedication:
Preface
Easing into the Fundamentals of Design Patterns
Chapter 1: PHP and Object-Oriented Programming
Chapter 2: Basic Concepts in OOP
Chapter 3: Basic Design Pattern Concepts
Chapter 4: Using UMLs with Design Patterns
Creational Design Patterns
Chapter 5: Factory Method Design Pattern
Chapter 6: Prototype Design Pattern
Structural Design Patterns
Chapter 7: The Adapter Pattern
Chapter 8: Decorator Design Pattern
Behavioral Design Patterns
Chapter 9: The Template Method Pattern
Chapter 10: The State Design Pattern
MySQL and PHP Design Patterns
Chapter 11: A Universal Class for Connections and a Proxy Pattern for Security
Chapter 12: The Flexibility of the Strategy Design Pattern
Chapter 13: The Chain of Responsibility Design Pattern
Chapter 14: Building a Multidevice CMS with the Observer Pattern
Colophon