Thursday, 17 May 2007
Article: Basics of Using the Prototype Pattern with PHP 5 |
| |
|
| |
Alejandro Gervasio in a two part series demonstrates the basic functionality provided by the prototype pattern with PHP 5. He adds that the prototype class lets you use many instances of a specific class, without copying objects to different variables.
In plain terms, he explains that when the prototype pattern is applied, the first instance of a class is used as a prototype model, and all the other instances of the class in question are created by cloning the mentioned prototype object. He gives the following steps to understand the tutorial in a better way:
- Implementing the prototype pattern: to demonstrate how the prototype pattern works , he defines a bunch of sample classes for establishing the basic structure of different types of data. Then, using these classes, he shows you how to create multiple instances of a specific class with the prototype pattern.
|
| |
|
Read the Article
|
| |
|
|
| |
|
|
| |
|