Learning PHP Design Patterns

Overview

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 ...

See more details below
Paperback
$24.12
BN.com price
(Save 39%)$39.99 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (12) from $8.81   
  • New (8) from $22.03   
  • Used (4) from $8.81   
Learning PHP Design Patterns

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK
  • NOOK HD/HD+ Tablet
  • NOOK
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$18.99
BN.com price
(Save 44%)$33.99 List Price

Overview

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
Read More Show Less

Product Details

  • ISBN-13: 9781449344917
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 3/4/2013
  • Edition number: 1
  • Pages: 339
  • Sales rank: 778,769
  • Product dimensions: 6.90 (w) x 9.10 (h) x 0.90 (d)

Meet the Author

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.

Read More Show Less

Table of Contents

Dedication:;
Preface;
Audience;
Assumptions This Book Makes;
Contents of This Book;
Conventions Used in This Book;
Using Code Examples;
Safari® Books Online;
How to Contact Us;
Acknowledgments;
Easing into the Fundamentals of Design Patterns;
Chapter 1: PHP and Object-Oriented Programming;
1.1 Entering into Intermediate and Advanced Programming;
1.2 Why Object-Oriented Programming?;
1.3 Classes and Objects;
1.4 The Client as a Requester Class;
1.5 What About Speed?;
1.6 What’s Wrong with Sequential and Procedural Programming?;
Chapter 2: Basic Concepts in OOP;
2.1 Abstraction;
2.2 Encapsulation;
2.3 Inheritance;
2.4 Polymorphism;
2.5 Easy Does It;
Chapter 3: Basic Design Pattern Concepts;
3.1 The MVC Loosens and Refocuses Programming;
3.2 Basic Principles of Design Patterns;
3.3 Design Patterns as a Big Cheat Sheet;
3.4 Choosing a Design Pattern;
Chapter 4: Using UMLs with Design Patterns;
4.1 Why Unified Modeling Language (UML)?;
4.2 Class Diagrams;
4.3 Participant Symbols;
4.4 Relationship Notations;
4.5 Object Diagrams;
4.6 Interaction Diagrams;
4.7 The Role of Diagrams and Notations in Object-Oriented Programming;
4.8 Tools for UMLs;
4.9 Other UMLs;
Creational Design Patterns;
Chapter 5: Factory Method Design Pattern;
5.1 What Is the Factory Method Pattern?;
5.2 When to Use the Factory Method;
5.3 A Minimalist Example;
5.4 Accommodating Class Changes;
Chapter 6: Prototype Design Pattern;
6.1 What Is the Prototype Design Pattern?;
6.2 When to Use the Prototype Pattern;
6.3 The Clone Function;
6.4 A Minimalist Prototype Example;
6.5 Adding OOP to the Prototype;
6.6 The Prototype in PHP Land;
Structural Design Patterns;
Chapter 7: The Adapter Pattern;
7.1 What Is the Adapter Pattern?;
7.2 When to Use the Adapter Pattern;
7.3 The Adapter Pattern Using Inheritance;
7.4 The Adapter Pattern Using Composition;
Chapter 8: Decorator Design Pattern;
8.1 What Is the Decorator Pattern?;
8.2 When to Use the Decorator Pattern;
8.3 Minimalist Decorator;
8.4 What About Wrappers?;
8.5 Decorators with Multiple Components;
8.6 HTML User Interface (UI);
Behavioral Design Patterns;
Chapter 9: The Template Method Pattern;
9.1 What Is the Template Method Pattern?;
9.2 When to Use the Template Method;
9.3 Using the Template Method with Images and Captions: A Minimal Example;
9.4 The Client;
9.5 The Hollywood Principle;
9.6 Using the Template Method with Other Design Patterns;
9.7 The Factory Method Participants;
9.8 The Hook in the Template Method Design Pattern;
9.9 The Small and Mighty Template Method;
Chapter 10: The State Design Pattern;
10.1 What Is the State Pattern?;
10.2 When to Use the State Pattern?;
10.3 The State Machine;
10.4 Light On, Light Off: The Minimal State Design Pattern;
10.5 Adding States;
10.6 The Navigator: More Choices and Cells;
10.7 The State Pattern and PHP;
MySQL and PHP Design Patterns;
Chapter 11: A Universal Class for Connections and a Proxy Pattern for Security;
11.1 A Simple Interface and Class for MySQL;
11.2 The Protection Proxy for Login;
11.3 The Proxy and Real-World Security;
Chapter 12: The Flexibility of the Strategy Design Pattern;
12.1 Encapsulating Algorithms;
12.2 A Minimalist Strategy Pattern;
12.3 Expanded Strategy Pattern with Data Security and Parameterized Algorithms;
12.4 The Flexible Strategy Pattern;
Chapter 13: The Chain of Responsibility Design Pattern;
13.1 Passing the Buck;
13.2 The Chain of Responsibility in a MySQL Help Desk;
13.3 Automated Chain of Responsibility and Factory Method;
13.4 Ease of Update;
Chapter 14: Building a Multidevice CMS with the Observer Pattern;
14.1 Built-In Observer Interfaces;
14.2 When to Use the Observer Pattern;
14.3 Using SPL with the Observer Pattern;
14.4 Free Range PHP and the Observer Pattern;
14.5 Making a Simple CMS;
14.6 Thinking OOP;
Colophon;

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)