The Strategy Design Pattern in C#

The strategy design pattern allows you to encapsulate a group or family of algorithms, making them interchangeable. This allows code to determine which strategy to use at runtime. The strategy pattern is a behavioral pattern and is one of the original design patterns defined by the Gang of Four (GoF).   What Problem Does It Solve? The strategy pattern allows …

The Observer Design Pattern in C#

The Observer design pattern is a behavioral pattern and was one of the original design patterns defined by the Gang of Four (GoF). The Observer pattern defines a relationship between a publisher, also known as a subject, and one or more subscribers, also known as observers. In this post, I will describe the pattern and show a sample implementation. What …

The Factory Design Pattern in C#

The factory design pattern is a widely accepted and well-regarded creational design pattern. It is one of the original 23 design patterns from the Gang of Four (GoF). The factory design pattern defines an interface for creating new objects instead of using the new keyword but allows classes that implement the interface to decide which class to instantiate. Simply put, the factory …

A Beginner’s Guide to Creating Custom ASP.NET MVC HTML Helpers

Introduction As a beginner, creating your own custom HTML Helpers might seem a bit daunting but it doesn’t have to be. Eventually, they boil down to simple HTML that all web developers are familiar with. In fact, HTML Helpers are very easy to create and the difficulty scales directly with the complexity of the problem you are trying to solve …

Software Development Basics – Object-Oriented Programming

Life is complex. Developing software is complex. When creating software that models life, a paradigm is needed to break that complexity down into something that we can comprehend and that can eventually be implemented into a computer program. Object-oriented programming or OOP is one of the best known and most practiced paradigms available. There are four main tenets or concepts that …