Learning PHP Design Patterns - William Sanders

Learning PHP Design Patterns

(Autor)

Buch | Softcover
362 Seiten
2013
O'Reilly Media, Inc, USA (Verlag)
978-1-4493-4491-7 (ISBN)
35,90 inkl. MwSt
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

Dr. William B. Sanders is a Professor of Multimedia Web Design and Development at the University of Hartford. He teaches courses in PHP, MySQL, C#, SQL, HTML5, CSS, and ActiionScript 3.0 among other Internet languages. He co-authored »ActionScript 3.0 Design Patterns« (O'Reilly, 2007) and has been actively working with design patterns in PHP for several years. He has published 45 computer and computer-related books, written software ranging from Basic to Assembly Language to Flash Media Server and served as a consultant and beta tester for different computer software companies including Macromedia and Adobe. He also is an Apple iOS Devloper.

Easing into the Fundamentals of Design Patterns
Chapter 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?
Chapter 2 Basic Concepts in OOP
Abstraction
Encapsulation
Inheritance
Polymorphism
Easy Does It
Chapter 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
Chapter 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
Creational Design Patterns
Chapter 5 Factory Method Design Pattern
What Is the Factory Method Pattern?
When to Use the Factory Method
A Minimalist Example
Accommodating Class Changes
Chapter 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
Structural Design Patterns
Chapter 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
Chapter 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)
Behavioral Design Patterns
Chapter 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
Chapter 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
MySQL and PHP Design Patterns
Chapter 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
Chapter 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
Chapter 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
Chapter 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
Colophon

Erscheint lt. Verlag 2.4.2013
Zusatzinfo illustrations
Verlagsort Sebastopol
Sprache englisch
Maße 178 x 233 mm
Gewicht 567 g
Themenwelt Informatik Web / Internet PHP
ISBN-10 1-4493-4491-7 / 1449344917
ISBN-13 978-1-4493-4491-7 / 9781449344917
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich
das umfassende Handbuch

von Christian Wenz; Tobias Hauser

Buch | Hardcover (2024)
Rheinwerk (Verlag)
49,90