Learning PHP Design Patterns

Object-Oriented Programming for Dynamic Projects

Specificaties
Paperback, 339 blz. | Engels
O'Reilly | 1e druk, 2013
ISBN13: 9781449344917
Rubricering
Hoofdrubriek : Computer en informatica
O'Reilly 1e druk, 2013 9781449344917
Verwachte levertijd ongeveer 16 werkdagen

Samenvatting

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

Specificaties

ISBN13:9781449344917
Taal:Engels
Bindwijze:paperback
Aantal pagina's:339
Uitgever:O'Reilly
Druk:1
Verschijningsdatum:20-2-2013

Inhoudsopgave

Preface

Part 1: Easing into the Fundamentals of Design Patterns
1. PHP and Object-Oriented Programming
-Entering into Intermediate and Advanced Programming
-Why Object-Oriented Programming?
-Classes and Objects
-The Client as a Requester Class
-What About Speed?
-What's Wrong with Sequential and Procedural Programming?

2. Basic Concepts in OOP
-Abstraction
-Encapsulation
-Inheritance
-Polymorphism
-Easy Does It

3. Basic Design Pattern Concepts
-The MVC Loosens and Refocuses Programming
-Basic Principles of Design Patterns
-Design Patterns as a Big Cheat Sheet
-Choosing a Design Pattern

4. Using UMLs with Design Patterns
-Why Unified Modeling Language (UML)?
-Class Diagrams
-Participant Symbols
-Relationship Notations
-Object Diagrams
-Interaction Diagrams
-The Role of Diagrams and Notations in Object-Oriented Programming
-Tools for UMLs
-Other UMLs

Part 2: Creational Design Patterns
5. Factory Method Design Pattern
-What Is the Factory Method Pattern?
-When to Use the Factory Method
-A Minimalist Example
-Accommodating Class Changes

6. Prototype Design Pattern
-What Is the Prototype Design Pattern?
-When to Use the Prototype Pattern
-The Clone Function
-A Minimalist Prototype Example
-Adding OOP to the Prototype
-The Prototype in PHP Land

Part 3: Structural Design Patterns
7. The Adapter Pattern
-What Is the Adapter Pattern?
-When to Use the Adapter Pattern
-The Adapter Pattern Using Inheritance
-The Adapter Pattern Using Composition

8. Decorator Design Pattern
-What Is the Decorator Pattern?
-When to Use the Decorator Pattern
-Minimalist Decorator
-What About Wrappers?
-Decorators with Multiple Components
-HTML User Interface (UI)

Part 4: Behavioral Design Patterns
9. The Template Method Pattern
-What Is the Template Method Pattern?
-When to Use the Template Method
-Using the Template Method with Images and Captions: A Minimal Example
-The Client
-The Hollywood Principle
-Using the Template Method with Other Design Patterns
-The Factory Method Participants
-The Hook in the Template Method Design Pattern
-The Small and Mighty Template Method

10. The State Design Pattern
-What Is the State Pattern?
-When to Use the State Pattern?
-The State Machine
-Light On, Light Off: The Minimal State Design Pattern
-Adding States
-The Navigator: More Choices and Cells
-The State Pattern and PHP

Part 5: MySQL and PHP Design Patterns
11. A Universal Class for Connections and a Proxy Pattern for Security
-A Simple Interface and Class for MySQL
-The Protection Proxy for Login
-The Proxy and Real-World Security

12. The Flexibility of the Strategy Design Pattern
-Encapsulating Algorithms
-A Minimalist Strategy Pattern
-Expanded Strategy Pattern with Data Security and Parameterized Algorithms
-The Flexible Strategy Pattern

13. The Chain of Responsibility Design Pattern
-Passing the Buck
-The Chain of Responsibility in a MySQL Help Desk
-Automated Chain of Responsibility and Factory Method
-Ease of Update

14. Building a Multidevice CMS with the Observer Pattern
-Built-In Observer Interfaces
-When to Use the Observer Pattern
-Using SPL with the Observer Pattern
-Free Range PHP and the Observer Pattern
-Making a Simple CMS
-Thinking OOP

Index

Net verschenen

Rubrieken

Populaire producten

    Personen

      Trefwoorden

        Learning PHP Design Patterns