Design Patterns: Factories

Sign in to queue

Description

This is the sixth of an eight part series where Robert is joined by Phil Japikse to discuss design patterns. A design pattern is a best practice you can use in your code to solve a common problem.  In this episode, Phil demonstrates the Simple Factory, Factory Method and Abstract Factory patterns. The Simple Factory pattern encapsulates object creation in one place. The Factory Method pattern uses factory methods to deal with the problem of creating objects without having to specify the exact class of the object that will be created. The Abstract Factory pattern provides a way to encapsulate a group of individual factories that have a common theme without specifying their concrete classes. 

Episodes in this series:

Resources

Embed

Download

The Discussion

  • User profile image
    rickhodder

    Great series, guys! When you were asking what pattern was being used in OrderPizza, I would also say that OrderPizza resembles the TemplateMethod pattern. And in GOF, FactoryMethod is mentioned as a pattern that is commonly used in TemplateMethod

Add Your 2 Cents