The Registry Pattern Reexamined
Last July, I wrote about the registry pattern and some of its advantages. These advantages include the ability to access objects across different areas of your application, and the storage of objects for later retrieval.
Much of the debate in the comments focused on whether or not the registry pattern was suitable for today’s object-oriented development, and some of the arguments focused on whether or not the “global scope” was a good place to have objects.
Use Registry To Remember Objects (So You Don’t Have To)
One of the biggest challenges in OOP programming with PHP is the ability to pass around objects and let other objects use them. This challenge can be solved with careful design, however. Here we will discuss the registry pattern, not a member of the GoF’s original patterns but still an important pattern nonetheless.
(more…)
Object oriented programming always leaves you with a headache. What if you could master it instead? Stop struggling with object oriented PHP. Mastering Object Oriented PHP is the answer!
Imagine if you could write clear, compelling code each and every time you sat down to work. You can do this. I'll show you how with The Ten Commandments of Clean Code.
Brandon Savage has been a software developer since 2003. Ever since discovering that he could use software to automate routine tasks, he's been hooked. Brandon is passionate about perfecting the art of software development.