
Design Patterns Part 1 – You Create Me!
Coding Blocks
00:00
Using the Factory Pattern, You're Not Newing Up a Dodge.
In the factory pattern, you are basically implementing an interface with multiple different types of factories. And again, it uses reflection generally speaking based off a config value. So like in your config, you might have BMW as the factory type that you want it to instantiate. Or if you have a value that you're passing at the time, but again, the whole key is you are not newing up a BMW,. The factory is doing it for you. You just know you're getting back a type of I auto.
Transcript
Play full episode