Coding Blocks cover image

Design Patterns Part 1 – You Create Me!

Coding Blocks

00:00

Using the Factory Pattern to Build Complex Objects

The big difference between this and factors is that it's the client code that's calling the shots. So you have your initial thing where you instantiate your builder class, right? Like your string builder. And then you're going to keep calling a pen,. And so basically what it's doing is it keeps taking your inputs. It does exactly what it says. The factory pattern isn't necessarily that it's building a complex object, although it may be, but hiding that complexity.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app