Loading…
CppCon 2021 has ended
Back To Schedule
Wednesday, October 27 • 2:00pm - 3:00pm
The Factory Pattern

Log in to save this to your schedule, view media, leave feedback and see who's attending!

Feedback form is now closed.
This session is part of the Software Design Track.

C++ programs that are dynamic in nature have to create objects at some time during run-time. New objects can be created by explicitly calling ‘new’ and then the data type of that object. However, this requires that a programmer knows at ‘compile-time’ what object should be created. What we would like, is to have a layer of abstraction, or someway to create objects at run-time to reflect the dynamic nature of some C++ programs. Luckily, there is a common pattern that can help solve this problem--the factory design pattern.

In this talk, we are going to discuss a creational design pattern known as a factory. The pattern can be as simple as a function, or take on other forms as a distributed factory, or an abstract factory. We’ll show some basic examples of a factory in modern C++ as well as real world use cases of where factories occur for further study. Finally, we’ll discuss the tradeoffs of the factory pattern, and discuss which scenarios you may not actually want to use a factory. Attendees will leave this talk with the knowledge to go forward and implement the factory pattern, as well as how to spot the factory pattern in projects they may already be working on!

ALL TALK SESSIONS CAN BE ACCESSED FROM THE MAIN LOBBY: https://cppcon.digital-medium.co.uk/

Speakers
avatar for Mike Shah

Mike Shah

Professor / (occasional) 3D Graphics Engineer, Northeastern University
Mike Shah is an Associate Teaching Professor at Northeastern University in the Khoury College of Computer Sciences. His primary teaching interests are in computer systems, computer graphics, and software engineering. His research interests are related to performance engineering (dynamic... Read More →


Wednesday October 27, 2021 2:00pm - 3:00pm MDT