• Albert Bennett

Design Patterns

Updated: Jul 12, 2021

Welcome to the big wild, confusing world of DESIGN PATTERNS!


In this episode... I will be explaining what they are and why they are useful when developing software. In short design patterns are reusable data structures and functions that are used to reduce the amount of "boiler plate" code that has to be written by you the programmer. Essentially design patterns they fall into three types:

. Creational

. Behavioral

. Structural


In short, each pattern has it's place and it's usages. When used in the proper context, patterns can be an effective tool in your... toolbox to better optimise and manage your code. I won't be going through all of them as in my career so far I have only see usages of a few of them. There are 22 patterns in total, I am hoping to get through at least 17 of them as I found these to be the most useful. As a side note, in cloud computing there is an additional set of patterns that can be used. I'll save them for a cloud specific version of this module, if I get around to it.


In short a design pattern is a solution to a reoccurring problem in context.


Below I have listed out all of the design patterns from the GOF (Gang of Four, they invented these go check them out, it's worth a look-see):

- Creational

. Abstract Factory / Factory (I'll be rolling these into the one project)

. Singleton (Very important)

. Builder Pattern

. Prototype

- Behavioral

. Interpreter

. Visitor

. State

. Mediation

. Strategy

. Observer

. Iterator

. Template Method

. Chain of Responsibility (not so important nowadays)

. Memento

. Command

- Structural

. Proxy

. Flyweight

. Composite

. Decorator

. Bridge

. Adapter

. Facade

I prefer to program using C#, and the samples that I will be providing will be in C#, that's not to say that theses patterns are C# specific but, to the best of my knowledge they are more applicable to object orientated languages. The patterns listed above that aren't highlighted in red will be covered in this module.


As with most other code samples that I have put up there is a link to the GitHub repo at the start of the post, fee free to go to give it a look-see :)

21 views0 comments

Recent Posts

See All