Registry Pattern in Zend Framework
The registry has provided a mechanism which help you to store and maintain your objects within the application. It’s aim at preventing improperly using the global objects by users. The registry usually provide the functions which makes you really comfortable to manage the objects such as storing, fetching, deleting and so on. Now let’s take a look at how [...]
Singleton Pattern in Zend Framework
The singleton provides a very good solution to the problem when you need an object to be handled as always single and global. Singleton, which may usually merge up with other patterns (e.g. registry, factory), has been used in creating the independent objects for the application such as session and database connection etc.. Now let’s go and [...]
Factory Pattern in Zend Framework
The factory pattern is a simple but powerful design pattern which makes it very easy to manage and maintain plenty of classes. The factory pattern, as it means, is using some material to provide products. But what we call the factory pattern here is to create the objects by assigning parameters to the producer [...]
Builder Pattern in Zend Framework
When we want to implement one thing in different ways, we think of builder design pattern. It’s like a building, when, design has been done, though handled by different engineers directing different construction teams, eventually the building will be the same. Here I have to say something about the different between the builder pattern [...]
Iterator Pattern in Zend Framework
The Iterator design pattern has provided a common mechanism for accessing collections. It allow user to traversal, access, and manipulate data sets, such as array, files, RSS feeds and database result sets etc., in the same way. One of the progresses which php5 compare to php4 is that it encapsulates a variety of iterator [...]
Strategy Pattern in Zend Framework
In the traditional process-oriented languages are often filled with a lot of if/else statements. This situation has easily made the logic of chaos and trouble to amend. The strategy design pattern was borned to solve this kind of problems. When we face a problem which got serveral solution strategies, we can use the strategy [...]