PHP Design Patterns

More than 730 titles from different sources. Prepared by gotAPI.com

Ajax and JavaScript
Database: Development
Database: MySQL
Database: Others
Design Patterns
E-Mail Processing and Notifications
File Management and Upload
Forms
Generic Web Services and SOAP
Installation and Configuration
LDAP
Logging
Managing and Resizing Images
Network and Sockets
Object-Oriented Programming (OOP)
PEAR
Performance Optimization
PHP 5
PHPLIB / Standard Library
RSS, Atom and Syndication
Security
Session and Cookies
Testing and Debugging
WML and Mobile Devices
XML/XSL Parsing and Processing

1 - 75
76 - 150
151 - 225
226 - 300
301 - 375
376 - 450
451 - 525
526 - 600
601 - 675
676 - 750


www.gotAPI.com
An Introduction to the Observer Pattern in PHP tutorial by Alejandro Gervasio
If you have reached the point in your programming life where you are using design patterns, you will want to read this article. The first of a three-part series, it covers the Observer pattern, which can be just the thing for situations where objects need to send information to a centralized mechanism.

An Introduction to Using the Decorator Pattern with PHP tutorial by Alejandro Gervasio
A decorator class allows you to add more capacity to an existing class while leaving the original class untouched. It has certain advantages over inheritance, as you will learn in this first article of a three-part series.

Building an Error Logger with the Chain of Responsibility Pattern in PHP 5 by Alejandro Gervasio
If you re one of those PHP developers that wants to expand your background in pattern-based programming, then this article may suit your needs. Welcome to the second part of the series Understanding the Chain of Responsibility Between PHP Objects. Comprised of three installments, this series goes through the basics of building a chain of responsibility across several PHP objects, and teaches you how to apply this pattern by using copious code s...

Centralizing the Validation of Data with the Observer Pattern in PHP by Alejandro Gervasio
Are you looking for an easygoing article that teaches you how to implement the Observer design pattern inside your PHP 5 applications? Your search is finished! Welcome to the last part of the series The Observer Pattern in PHP. Made up of three articles, this series will show you how to create and work with observer objects, without making you scratch your head while looking at complex code samples.

Design Patterns and PHP 5 by Sams Publishing
Last week, we began our overview of the object-oriented features of PHP 5. This week, we will start discussing design patterns. This article, the second of several parts, is excerpted from chapter two of the book

Design Patterns in PHP - Factory Method and Abstract Factory tutorial by David Fells
Normally, in object oriented programming, object creation is not difficult. But what if your object needs to be created based on different conditions or other matters of context? Then you will spend hours in debugging and updating--unless you know about design patterns. David Fells explains how they work, and uses the creation of a maze to illustrate his points.

Developing a Form Validation System with the Observer Pattern in PHP by Alejandro Gervasio
Want to gain a good grounding in how to apply the Observer pattern in PHP? Then you re in the right place! Welcome to the second part of the series The Observer Pattern in PHP. Composed of three tutorials, this series teaches you the key concepts of the popular Observer design pattern, and shows you how to apply it in the context of real-world PHP applications.

Expanding an Error Logger with the Chain of Responsibility Pattern by Alejandro Gervasio
Do you want to know how to build an error logging system using the chain of responsibility schema with PHP? If your answer is a loud yes, then in this group of articles you ll find what you ve been looking for! Welcome to the concluding part of the series Understanding the chain of responsibility between PHP objects. This set of three tutorials shows you how to define a specific chain of responsibility that involves several PHP objects, and app...

Expanding the Application Range of Visitor Objects in PHP 5 tutorial by Alejandro Gervasio
Has your career as PHP developer led you to learn more about the most popular design patterns? If it has, then this series may help you get a better grounding in them. Welcome to the second installment of the series Introducing Visitor Objects in PHP 5. Made up of three articles, this series introduces the key points of how to apply the visitor pattern in PHP, and emphasizes the practical side of the topic by walking you though copious hands-on...

Generating Web Pages with the Flyweight Pattern in PHP 5 by Alejandro Gervasio
Unnecessary and balanced instantiation of PHP classes are issues that can be easily solved by using the flyweight design pattern. If you want to learn more about it, you should start reading this article. Welcome to the final part of the series Using the flyweight pattern with PHP 5. As you may have guessed, this series walks you through the implementation of this helpful pattern with PHP, and shows you how to apply it in concrete cases.

Handling File Data with the Facade Pattern in PHP 5 tutorial by Alejandro Gervasio
Are you interested in learning the foundations of different structural patterns in PHP 5? If your answer is affirmative, then you should start reading this article immediately! Welcome to the last installment of the series Introducing the Facade Pattern in PHP 5. In two consecutive articles, this series shows you how to create and use facade classes in PHP-based development environments.

Implementing Patterns within PHP by W. Jason Gilmore
PHP 5, due for release in the coming weeks, will offer users an abundance of new and enhanced features, yet perhaps none are as appealing as the vast improvements to its object-oriented capabilities. In an earlier article, I introduced these new features, showing you how to improve class management using variable and method scopes, interfaces, abstract classes, and unified constructors and destructors. These enhancements allow you to take a far m...

Introducing Mediator Classes in PHP 5 tutorial by Alejandro Gervasio
The mediator design pattern can help you achieve and maintain synchronization between a group of PHP classes. In this first of a two-part series, you ll be introduced to the mediator pattern, how it functions, and how it can help you with your application development.

Introducing the Chain of Responsibility Between PHP Objects tutorial by Alejandro Gervasio
This article, the first of three parts, introduces you to the chain of responsibility pattern in PHP 5. This pattern is useful when a specific class cannot deal with a particular task, and must therefore transfer a program s execution to another class with the appropriate capability.

Introducing the Composite Pattern in PHP 5 tutorial by Alejandro Gervasio
The composite pattern is one of the less commonly used patterns in PHP 5. Nevertheless, in certain situations, it is very helpful. This article, the first one in a two-part series, will introduce you to the basic concepts of the composite pattern.

Introducing the Facade Pattern in PHP 5 tutorial by Alejandro Gervasio
The facade pattern may be one of the less well known patterns in PHP, but it definitely has its uses. In this first article of a two-part series, you ll learn the basics of how the facade pattern works, illustrated with numerous examples.

Introducing the Flyweight Pattern with PHP 5 tutorial by Alejandro Gervasio
Among the considerable variety of structural design patterns that can be implemented with PHP 4 (and PHP 5, by the way), there s one in particular that deserves special attention. It s easy to apply in the context of a given web application, and it offers remarkable functionality when it comes to preventing the unnecessary instantiation of different classes. This two-part series covers that pattern.

Introducing the Memento Pattern tutorial by Alejandro Gervasio
PHP developers frequently need to maintain the state of an object across several web pages. There are a number of ways to do this. In this article, the first of two parts, you will learn how to handle this task with the memento pattern.

Introducing the Strategy Pattern tutorial by Alejandro Gervasio
The strategy design pattern can be very useful in the context of form validation. This article, the first of two parts, will introduce you to the strategy pattern and give you some idea of how you can use it in your own PHP applications.

Introducing Visitor Objects in PHP 5 tutorial by Alejandro Gervasio
Although the article s title may seem a bit intimidating, the truth is that things are much simpler than you think. Like many other programming languages, PHP also allows you to construct and use visitor objects with minor hassles. But, before I go deeper into the subject, first let s ask ourselves the following question: what are visitor objects, after all?

Introduction to Creating Command Objects with PHP 5 tutorial by Alejandro Gervasio
In this article, the first part of a series, you ll learn the basics of applying the command pattern with PHP 5. As always, plenty of hands-on examples are included.

More Examples of Creating Command Objects with PHP 5 tutorial by Alejandro Gervasio
Are you one of those PHP developers who wants to expand your background in design patterns by learning an additional one? If your answer is affirmative, then this series might be appealing to you. It will teach you, in three educational tutorials, how to create and implement command objects with PHP 5.

Object Interaction and Mediator Classes in PHP 5 tutorial by Alejandro Gervasio
Are you looking for an approachable guide on how to use the mediator design pattern in PHP 5? If you answered yes, then you should take a look at this group of articles. Welcome to the final part of the series that began with Introducing Mediator Classes in PHP 5. This series takes you through building mediator classes with PHP, and shows you how to use this useful pattern with copious code samples.

Object-Oriented Programming Through Design Patterns tutorial by Sams Publishing
If you re looking for an overview of the new object-oriented features of PHP 5, you ve found a good place to start. This article, the first of several parts, is excerpted from chapter two of the book

PHP 5 OOP: Interfaces Abstract Classes and the Adapter Pattern tutorial by Adam Delves
PHP 5 made significant improvements on the Object Orientated programming model of PHP 4 bringing it more in line with languages such as Visual Basic .NET and Java. The improved object model in PHP 5 makes developing applications using OOP much easier and gives you the programmer, greater flexibility. In this series of articles I will demonstrate the new features of the PHP 5 object and show you how to create a database abstraction layer similar t...

PHP 5 OOP: The Template Pattern by Adam Delves
This article concludes a series on PHP5 OOP. In the first article, PHP 5 OOP: Interfaces Abstract Classes and the Adapter Pattern, I presented an interface for abstracting database access from the actual database. In the second article, PHP 5 OOP: Protecting Data With Visibility, I showed how to expand upon the functionality built in the first article in order to show how to protect your data using visibility modifiers. In the third article, ...

PHP Iterator by Dejan Bosanac
PHP arrays are generally a very powerful object container. But still, we can easily add a little more fuel to them. Imagine an iterator object as a kind of wrapper around our arrays. What we will try to accomplish here is to create unique interface for traversing arrays and to add a little more control over how our objects are created and finally, to support lazy loading. Interface Iterator has a very simple and many times seen interface. ?p...

PHP Pattern Principles tutorial by Matt Zandstra
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. This article will cover 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: Patte...

Polymorphism, Design Patterns, and PHP Programming by Sams Publishing
Last week, we continued our discussion of the object-oriented features of PHP 5 by taking a first look at design patterns. This week, we will continue looking at design patterns, and examine polymorphism. This article, the third of four parts, is excerpted from chapter two of the book

The Active Record Pattern tutorial by php|architect
This article, the first of two parts, helps you use design patterns to better organize how your web application interacts with a database. It is excerpted from chapter 14 of the book

The Active Record Pattern, concluded tutorial by php|architect
This article, the second of two parts, helps you use design patterns to better organize how your web application interacts with a database. It is excerpted from chapter 14 of the book

The Iterator Pattern by php|architect
This article, the first of two parts, explains how to use the Iteratorpattern to manipulate any collection of objects. It is excerpted fromchapter eight of the book

The Iterator Pattern, concluded tutorial by php|architect
This article, the second of two parts, explains how to use the Iterator pattern to manipulate any collection of objects. It is excerpted from chapter eight of the book

The Singleton and Factory Patterns in PHP: a rendering-capable factory class tutorial by Alejandro Gervasio
In this third part of the series, I will explain how to implement the Factory pattern in conjunction with the polymorphic characteristics of form objects. This will boost the functionality of the factory class by simplifying the process for rendering form elements.

The Singleton and Factory Patterns in PHP: Building a Form Generator Class tutorial by Alejandro Gervasio
In this final part of the series, Alejandro Gervasio examines a point that he has not taking into consideration so far: that the layout of form elements plays a relevant role within the overall development process. With this in mind, he encapsulates the logic needed to generate web forms by defining a form generator class. This class will implement the form element factory along with all of the required form element classes.

The Singleton and Factory Patterns in PHP: Building object-oriented forms tutorial by Alejandro Gervasio
Experienced PHP programmers know that web development problems are often tackled by using widely known design patterns within the context of an application. This article is the first in a series that will demonstrate how the Singleton and Factory patterns can be implemented in a real-world application.

The Singleton and Factory Patterns in PHP: Working With Singletons tutorial by Alejandro Gervasio
In this fourth part of the series covering the Singleton and Factory Design Patterns in PHP, we will discuss issues stemming from the fact that PHP 4 does not have an abstract class. Since we found it useful in the previous article to define the form element factory class as an abstract class, in this article we will discuss the process for making the form element factory class a Singleton, and how this serves our purposes.

Using Self-Saving Objects with Command Objects in PHP 5 tutorial by Alejandro Gervasio
If you were looking for an approachable guide on how to create and use command objects with PHP 5, then look no further, because your search is over. Welcome to the final part of the series Creating command objects with PHP 5. Comprised of three comprehensive tutorials, this series walks you through the basics of how to apply the command pattern in PHP, and it accompanies its corresponding theory with numerous code samples.

Using the Memento Pattern with a File Reading Class by Alejandro Gervasio
The memento pattern can be used to maintain the state of a property that belongs to a specific class. If you want to learn more about how to do this, start reading this tutorial! Welcome to the final installment of the series Maintaining the State of Classes. In two parts, this series teaches you how to use the memento design pattern with PHP 5, and it accompanies the corresponding theoretical concepts with diverse hands-on examples.

Using Visitor Objects with MySQL Data Sets in PHP 5 tutorial by Alejandro Gervasio
If you re looking for brand new material to help you expand your background in using design patterns with PHP 5, then hopefully this article will suit your needs. Welcome to the final installment of the series Introducing Visitor Objects in PHP 5. Composed of three chapters, this series walks you through the key points of creating and using visitor objects with PHP 5, and teaches you how to use them in the context of real-world applications.

Validating User Input with the Strategy Pattern by Alejandro Gervasio
The strategy design pattern is applied much more often than you might think, so if you want to find out how to implement it with PHP 5, this article should guide you through the whole learning process. Welcome to the final installment of the series that began with Introducing the Strategy Pattern. In two parts, this series walks you through the key points of how the strategy pattern works, and accompanies its theoretical concepts with copi...

Working with MySQL Result Sets and the Decorator Pattern in PHP tutorial by Alejandro Gervasio
If you re one of those avid PHP developers who wants to learn how to apply the decorator design pattern within your Web applications, then this group of articles might be quite appealing to you. Welcome to the second part of the series Using the Decorator pattern with PHP. Comprised of two parts, this series walks you through the core concepts of using this pattern in PHP, and shows you its practical edge with numerous hands-on examples.

Working with Strings and the Composite Pattern in PHP 5 by Alejandro Gervasio
Are you a PHP developer who wants to improve your skills in pattern-based programming in PHP? If the answer to this question is an emphatic yes, then you should begin reading this article now! Welcome to the final part of the series Implementing the composite pattern with PHP 5. Comprised of two instructive tutorials, this series walks you through the basic concepts of this important design pattern, and shows you how to apply it with some educa...