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.

(more…)

Friday, March 26th, 2010 @ 7:00 am | Comment (15) | Categories: Best Practices, Object-Oriented Development, Technology
Tags: , , , , , ,

Why Active Record Isn’t A Bad Design Pattern

Were I writing this as an article for a newspaper, the subhead would be “Design Patterns Don’t Cause Application Slowness.” The point of this piece isn’t to defend Active Record per se; it’s to discuss the fact that design patterns aren’t to blame for your application’s problems, and more to the point, design patterns aren’t the problem.

This discussion stems from a discussion with a friend of mine who swore up and down that Active Record was a terrible design pattern that was inefficient, poorly designed, and ill-suited for use by developers. As a PHP developer, it’s easy to embrace this call, especially since it’s always fun to trash Ruby on Rails folks; however, I’m not willing to take the position that design patterns are the cause of performance problems.

(more…)

Tuesday, March 16th, 2010 @ 9:00 am | Comment (9) | Categories: Best Practices, System Architecture, Object-Oriented Development, Technology
Tags: , ,

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…)

Tuesday, July 21st, 2009 @ 5:30 pm | Comment (31) | Categories: Best Practices, System Architecture, PHP 5
Tags: , , , , ,


Copyright © 2023 by Brandon Savage. All rights reserved.