Category Archives: Design Patterns

The 10 Minute Guide to the Observer Pattern in Python

Today I want to cover the Observer Pattern in Python. I’ll be using Python 3 but this should work equally well with Python 2.6.x and newer. According to Wikipedia the Observer Pattern is: A software design pattern in which an … Continue reading

Posted in Design Patterns, Open Source, Python | 4 Comments

Easily learn the Strategy Design Pattern with Java – a second visit

The Strategy design pattern allows you to select algorithms at runtime. The Strategy pattern is a behavioural pattern and sometimes you will see it used in things like validation, sorting or where a large switch statement has been replaced – … Continue reading

Posted in Design Patterns, Java | Comments Off on Easily learn the Strategy Design Pattern with Java – a second visit

Quickly learning the Adapter Design Pattern in Java

Today I’ll show one way to use the Adapter Design Pattern. This design pattern is also sometimes referred to as the “Wrapper Pattern” . As the name suggests and as Wikipedia tells us: “the adapter design pattern (often referred to … Continue reading

Posted in Design Patterns, Java | 1 Comment

Quickly learning the Decorator Design Pattern with Java

Today we will quickly go over the code to implement the Decorator Design Pattern. We will focus only on the code by introducing a scenario and finding a better way to solve the given problem using the Decorator Pattern.

Posted in Design Patterns, Java | 5 Comments

Quickly learning the Strategy Design Pattern with Java

Using Java I’ll quickly walk through how you can use the Strategy Design Pattern. We will cover how one might approach a particular problem and solve it, then we will re-examine the problem and apply a better solution using the … Continue reading

Posted in Design Patterns, Java | 4 Comments