What is the Factory Pattern? | Software Design Principles

preview_player
Показать описание
The factory pattern is one of the most popular design patterns. Factories help us delegate the responsibility of object creation to a dedicated object. Through polymorphism, we can further enhance this pattern. In this video, I define and discuss the utility of the Factory pattern and how it applies to software design. I also demonstrate the pattern through an easy to follow example.

Become a Better Developer Using the Courses I Recommend Below:

📚 MY RECOMMENDED READING LIST FOR SOFTWARE DEVELOPERS📚

🎙 MY RECORDING EQUIPMENT 🎙

💻 MY DESKTOP EQUIPMENT 💻

🌎 Find me here:

#FactoryPattern
#DesignPatterns
#SoftwareEngineer
Рекомендации по теме
Комментарии
Автор

Why doesn't this have more views? That's premium content.

dovias
Автор

The factory pattern helps us to NOT repeat logic all over the place - there is one and only one place to create a new object. So if that new object some day needs new parameters or less parameters, then we don't need to change our code all over the place. We need to only update the Factory where the new object is created.

ThuyNguyen-buge
Автор

What a great video. After watching the video several times I've finally grasped the core concept.

quocviet
Автор

The coding part really helps! Thank you so much! Would appreciate a video on Abstract Factory.

hafsahmr
Автор

Great content! Did you ever get around to creating the second video on the abstract factory pattern that you mentioned at the end of this video?

frederickjavalera
Автор

Thanks a lot Daniel, your videos are great!

ganeshb
Автор

quite an amazing course, I just want to say something that I wish it could be added which is how to approach using one of them "the use cases"

kais.alkotamy
Автор

Excellent, it made my understanding clear on Factory Method. Waiting for your next video on Abstract Factory Pattern.

rezazaman
Автор

Very crisp, clear voice. Good teaching!

Would you make a video about why we need the factory pattern - what problems the factory pattern is addressing?

ThuyNguyen-buge
Автор

Great contact.. Waiting for the second part

nitinakash
Автор

Good stuffs brother. Liked and Subscribed :)

avanthasiriwardana
Автор

If the branching logic is still there in the second approach, doesn't it still violate the open close principle ?

kshitizkumar
Автор

Great clarification 👏.
Do we have a SOLID principles playlist ? I couldn't find it

smirkedShoe
Автор

Shouldn't all these methods be outside of the Pizza class pizza.prepare(), pizza.bake(), pizza.cut(), pizza.box(), createPizza() and instead maybe be in the Factory?

uzayrsyed
Автор

did I miss the second part of Factory design pattern you have mentioned anywhere? could you please paste the link if you have posted on second part? thanks

ranjithaan
Автор

Nice video. Would be interested in seeing the composition version you mentioned. I feel composition is the way to go for most things in OOP

frotes
Автор

I still didn't get it. Isn't the main problem described as "violating the Open/Close Principle"?

If we were to add a new kind of Pizza Type, we still would need to modify the if/else type block anyways, so how did creating all that new logic helped to solve the problem if it's still there anyways.

Great content though.

misoren
Автор

In the last part, when you describe the NYPizzaStore, you break the Open / Close principle anyway, right? wouldn't it be better and optimal to split It in two other classes (NYPepperoniPizzaStore and NYCheesePizzaStore)? I hope you clarify my question. Congratulations on the great video!

lorenzoferri
Автор

What blackboard tool are you using? Nice clear explanation. Thank you.

MrUnknowntraveller
Автор

could you please provide link for abstract factory deisgn pattern video as you have mentioned in video?

parthshah