Tags » Design Patterns

Gang of Four : Observer Design pattern in Ruby


The observer pattern is a software design pattern in which an object, called the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by calling one of their  683 more words


A case for protected inheritance in C++

Protected inheritance is viewed by many (including myself, until recently) as the unwanted child of C++ – an antipattern to be avoided; if you’re using it then you’re almost certainly doing it wrong. 3,241 more words

Design Patterns

Tips for Migrating to Apex Enterprise Patterns

One of the common questions i get asked is, “How do i adopt Apex Enterprise Patterns within an existing code base?“.

Often its also folks who have not owned the code base from the start and are inheriting it. 659 more words


Real World Example of Adding Auditing With Dependency Injection’s Interception

Synopsis: This article walks through a real world example in which the Crosscutting Concern (1) ‘Auditing’ was added to the application without breaking the Single Responsibility Principle (2), nor the Open/Closed Principle (3), by utilizing Dependency Injection’s Interception. 2,660 more words

.NET Programming

Design patterns and practices in .NET: the Strategy Pattern


The strategy pattern is one of the simplest patterns to implement. Have you ever written code with ugly if-else statements where you check some condition and then call another method accordingly? 1,036 more words


Design patterns and practices in .NET: the Factory Patterns - concrete, static, abstract


Factories are extremely popular among design patterns. I have never seen any reliable statistics on the usage of patterns but factories must be among the top three most used patterns. 1,848 more words