Home arrow PHP arrow Registry Design Pattern: Complete Implementation

Registry Design Pattern: Complete Implementation

Welcome to the conclusion of a three-part article series that shows you how to implement the Registry design pattern in PHP. In this part, we'll take all the classes that we've created so far and put them to work together.

  1. Registry Design Pattern: Complete Implementation
  2. Review: building a basic session-based registry
  3. Defining a basic autoloader class
  4. Using the registry classes in a single script
By: Alejandro Gervasio
Rating: starstarstarstarstar / 2
July 21, 2010

print this article



So, if you're a PHP developer who wants to expand your current programming skills by learning how to implement the Registry design pattern in a few simple steps without having to deal with obscure and hard-to-grasp concepts, then you've come to the right place.

And now that you know what to expect from these articles, it's time to review the topics covered in the last one. In that article, I demonstrated how to create a basic, yet functional registry class. The class could save and retrieve resources across different points of an application by using the $_SESSION superglobal PHP array.

Hidden behind a fancy name, this sample class was nothing but a basic session handler that took advantage of the functionality offered by the registry pattern to do its business. This showed that registries can be used in distinct situations and with multiple persistent layers, but in all cases with similar purposes.

So far, I've illustrated how to build a few registry classes that used different storage mechanisms for storing/retrieving resources throughout several stages of a PHP program. That's all well and good, but it'd be useful to show how to put all of these classes to work in conjunction, at least for educational reasons.

That's exactly what I plan to do in this last chapter of the series, thus finishing this humble introduction to applying the registry pattern in PHP. So, don't hesitate any longer; start reading right now!

>>> More PHP Articles          >>> More By Alejandro Gervasio

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...

Developer Shed Affiliates


Dev Shed Tutorial Topics: