This video is free to watch - hope you enjoy it! If you like what you see, there's a ton more where that came from...

Sign Up

Design Patterns: Creational

Tried and true design patterns for creating objects in an object-oriented language.

This content is for subscribers only - which you can become in just 30 seconds!

Sign Up

People have been writing code in object-oriented languages for a long time and, as you might guess, have figured out common ways to solve common problems. These are called design patterns and there are quite a few of them.

In 1994 a group of programmers got together and started discussing various patterns they had discovered in the code they were writing. In the same way that the Romans created the arch and Brunelleschi created a massive dome – the Gang of Four (as they became known) gave object-oriented programmers a set of blue prints from which to construct their code. The Gang of Four are:

  • Erich Gamma
  • Richard Helm
  • Ralph Johnson
  • John Vlissedes

Let’s have a look at the most common design patterns that I’ve used and had to know about during my career. I’ll be using ES6 here because … well why not? Also, these patterns apply primarily to object-oriented programming (OOP) and are easily adaptable to JavaScrpt.

Creational Patterns

When working with an OO language you need to create objects. It’s a simple operation, but sometimes having some rules in place will help create the correct object, with the proper state and context.

The Code

You can find the code for each of the demos up on GitHub.

  • Design Patterns: Creational

    Tried and true design patterns for creating objects in an object-oriented language.

  • Design Patterns: Structural

    As your application grows in size you need to have a plan to handle the increase in complexity. The Gang of Four have some ideas that could work for you.

  • Design Patterns: Behavioral

    Mediators, Decorators and Facades - this is the deep end of object-oriented programming and something you'll come face to face with as your application grows.

  • Principles of Software Design

    You've heard the terms before: YAGNI, SOLID, Tell Don't ASK, DRY... what are they and what do they mean?

  • Testing Your Code: TDD and BDD

    Testing code has moved beyond the realm of QA and into the realm of design, asking you to think about what you do before you do it. Let's have a look at some strategies.

  • Shell Script Basics

    It's a Unix world. You should have a functional knowledge of how to get around a Unix machine using the command line, as well as how to complete basic tasks using shell scripts and Make files.

  • Hands On: Creating a Useful Shell Script

    I use the static site generator Jekyll to write my blog. I store the site at Github, who then translates and hosts it all for me for free. Jekyll is simple to use and I like it a lot. There's only one problem: it's a bit manual.

  • Deciphering a Complex Bash Script

    I use the static site generator Jekyll to write my blog. I store the site at Github, who then translates and hosts it all for me for free. Jekyll is simple to use and I like it a lot. There's only one problem: it's a bit manual.

  • Making Your Life Easier with Make

    Make is a build utility that works with a file called a Makefile and basic shell scripts. It can be used to orchestrate the output of any project that requires a build phase. It's part of Linux and it's easy to use.

  • Using Make to Improve Your Test Suite

    Make has been around forever and is often overlooked in favor of tools that recreate precisely what it does, but in crappier ways. Let's see how you can use Make to help your testing process.

Watch Again

[[prev.title]]

[[prev.summary]]

Next Up

[[next.title]]

[[next.summary]]