Design Patterns

  • Command

    Quick Information/Overview Pattern Type Behavioral Applicable Language/Framework Agnostic OOP Pattern Source Gang of Four Difficulty Easy – Moderate Up Front Definitions Invoker: This object services clients by exposing a method that takes a command as a parameter and invoking the command’s execute Receiver: This is the object upon which commands are performed – its state…

  • Chain of Responsibility

    Quick Information/Overview Pattern Type Behavioral Applicable Language/Framework Agnostic OOP Pattern Source Gang of Four Difficulty Easy Up Front Definitions N/A The Problem Let’s say that you’re doing something reasonably standard. You have some desktop application that deals with a persistence structure (file, web service, remote database, whatever) and displays things for the user. Since it’s…

  • |

    Builder

    Quick Information/Overview Pattern Type Creational Applicable Language/Framework Agnostic OOP Pattern Source Gang of Four Difficulty Relatively easy. Up Front Definitions Here are terms that I’ll be using in this explanation and what they mean: Composite: This is another design pattern, but I’m using it here to mean an object that is composed of other objects….

  • |

    Bridge

    Quick Information/Overview Pattern Type Structural Applicable Language/Framework Agnostic OOP Pattern Source Gang of Four Difficulty Somewhat complex to grasp, moderate to implement. Up Front Definitions There are no special definitions that I’ll use here not defined inline. The Problem The iconic example of a situation in which the Bridge pattern is applicable is modeling a…

  • |

    MVVM and Dialogs

    For those familiar with the MVVM (Model, View, View-Model) pattern in .NET development, one conundrum that you’ve probably pondered, or at least read about, is what to do about showing a dialog. For a bit of background, MVVM is centered around the concept of binding from the View (XAML markup) to the “ViewModel”, which essentially…