Factory Design Pattern
YouTube Viewers YouTube Viewers
1.54K subscribers
171 views
0

 Published On Mar 1, 2022

Let me introduce you to the Factory Pattern itself, the last one from the family of Factory Patterns. Solves different purpose from the Simple Factory Method and Factory Method patterns but sometimes uses the Factory Method under the hood.
It allows creating different product types and using them based on some condition. In our case, the condition was that we wanted our McDonaldsStores to use the local versions of their ingredients.
As always, the code is in Python and there's a diagram, this time after the code. Hopefully it will make its understanding a bit better.
Feel free to leave questions in the comments section!

#Python #DesignPatterns #FactoryPattern
-------------------------------------------------------------------------------------
📰 Sign up for my newsletter
Become a better dev in just 5 minutes (or so) a week: https://codevev.com

🖥️ Free Courses to Learn Programming
Harvard CS 50: https://pll.harvard.edu/course/cs50-i...
FreeCodeCamp: https://www.freecodecamp.org
Udacity: https://www.udacity.com

🛒 Products I recommend
https://codevev.com/#products

Connect with me
Website: https://evgenyurubkov.com
Youtube:    / @codevev  

#codevev

show more

Share/Embed