Very nice tutorial!! I really appreciate that you presented the visual diagram first, before delved into the code. That made it much easier to grasp the overall concept and purpose. Much appreciated!!
Thank you, i have watched 2 of your videos and i really appreciate them. Thanks again for making far more understandable than refactoring guru :D. Just a remark : it would had been nice if you could add a small window on right low corner that highlight the class your are coding of you UML diagram. i was a little lost after the payment package code.
What happens when I have to pass different parameters to each factory? What if my CreditCard needs additional parametets different from GooglePay or whatever
Good question. I would suggest using Polymorphism to overcome this challenge. In other words, have a single parameter that is of a complex object base type. Then you can have multiple concrete classes with the specific fields that you need that extend the base class. Then you can cast the base to the concrete class in your specific implementation (which the factory returns). I hope this makes sense?
Very nice tutorial!! I really appreciate that you presented the visual diagram first, before delved into the code. That made it much easier to grasp the overall concept and purpose. Much appreciated!!
Thank you for the excellent feedback!
sheeeet man. That was a great vid. ❤❤❤
Thank you 🙂
Thank you, i have watched 2 of your videos and i really appreciate them. Thanks again for making far more understandable than refactoring guru :D. Just a remark : it would had been nice if you could add a small window on right low corner that highlight the class your are coding of you UML diagram. i was a little lost after the payment package code.
Thanks @Yassou1985. This is awesome feedback and motivation for us. Like your idea about showing the class diagram while coding. Thank you.
Thanks, great tutorial!!!
Glad you enjoyed it!
you are awesome...❤
Thank you Robin, I am glad you enjoyed the video :-)
can you add all the design pattern for python.
What happens when I have to pass different parameters to each factory? What if my CreditCard needs additional parametets different from GooglePay or whatever
Good question. I would suggest using Polymorphism to overcome this challenge. In other words, have a single parameter that is of a complex object base type. Then you can have multiple concrete classes with the specific fields that you need that extend the base class. Then you can cast the base to the concrete class in your specific implementation (which the factory returns). I hope this makes sense?