Vide Rapula 0 seconds ago Hi, can I ask you for an advice for my homework. We have an usage case and we need to decide which creational design patterns we need to use
Good video. 2:49 - iirc, a wrapper over an object creation is called a creation method, not a factory method. A factory method is a pattern that works on inheritance, an creating a wrapper over an object has nothing to do with inheritance. Creation methods & static creation methods are often confused with factory methods. But they're not the same, not at all. That would be cool to differentiate these.
Obviously, factories are extremely useful with polymorphism. But when we're creating a simple factory producing non-polymorphic objects, is there any advantage in implementing factories over using class constructors?
Sure, because you get to have multiple factories that will produce different objects based on current needs, only requirement is to have common interface on produced objects. No need for polymorphism.
Generally, you write factory to handle creation of objects which have same inteface, so when you ask factory: gimme something which implement that interface according to parameters which I give you - factory will create object of certain type based on your request.
Example of builder and director usage was kinda wrong: you don't need director(who do the general manipulation on the general builder) because you could directly manipulate builder, without need of using director. Even if director make complex manipulation on the builder, you still could put them into builder class, and then access builder "directly", lol. Director is helpful in cases(and/or) * when handled "builders" are not "blood-related". * when "builders" have different options to build object and already implemented without chance to modify them(so process of creation could be uniformed by director) * when you don't know builder but know exactly type of the builder "product", so it is handy to have general way to create "products" throw director(by the definition this is not a director anymore, but a factory)
I just discovered your channel right now (beacuse i got problems with design patterns :) ) ! Here's sub and like! You are really interesting mate and you make easier my faculty problems. Big up from Banjaluka, Balkan!
I only found your channel yesterday but it's already one of my favourite on UA-cam
same here
The only thing I can tell you is THAANK YOU MAN!
Here's a sub! This was one of the best and simplest explanation of creational design patterns. Great job man!
That intro was amazing! 😅
intro was hilarious 🤣😂😂
Deserves more views! Thank you for this!
Vide Rapula
0 seconds ago
Hi, can I ask you for an advice for my homework. We have an usage case and we need to decide which creational design patterns we need to use
top notch editing skills woah
Brilliant explanation, super clear! Now reading the gof book is much simpler, thank you!
Świetnie wyjaśnione!
Mam jedno pytanie, czy użycie singletona w przypadku DatabaseRoutera to przeważnie dobry wybór czy są lepsze alternatywy?
Great video and very helpful. Thanks so much!
Good video.
2:49 - iirc, a wrapper over an object creation is called a creation method, not a factory method. A factory method is a pattern that works on inheritance, an creating a wrapper over an object has nothing to do with inheritance.
Creation methods & static creation methods are often confused with factory methods. But they're not the same, not at all.
That would be cool to differentiate these.
Obviously, factories are extremely useful with polymorphism. But when we're creating a simple factory producing non-polymorphic objects, is there any advantage in implementing factories over using class constructors?
Sure, because you get to have multiple factories that will produce different objects based on current needs, only requirement is to have common interface on produced objects. No need for polymorphism.
Generally, you write factory to handle creation of objects which have same inteface, so when you ask factory: gimme something which implement that interface according to parameters which I give you - factory will create object of certain type based on your request.
Example of builder and director usage was kinda wrong: you don't need director(who do the general manipulation on the general builder) because you could directly manipulate builder, without need of using director. Even if director make complex manipulation on the builder, you still could put them into builder class, and then access builder "directly", lol. Director is helpful in cases(and/or)
* when handled "builders" are not "blood-related".
* when "builders" have different options to build object and already implemented without chance to modify them(so process of creation could be uniformed by director)
* when you don't know builder but know exactly type of the builder "product", so it is handy to have general way to create "products" throw director(by the definition this is not a director anymore, but a factory)
Hi, can I ask you for an advice for my homework. We have an usage case and we need to decide which creational design patterns we need to use.
I just discovered your channel right now (beacuse i got problems with design patterns :) ) ! Here's sub and like! You are really interesting mate and you make easier my faculty problems. Big up from Banjaluka, Balkan!
Thank you for such wonderful content!
thank you!
nice intro get me attracted
good content but sometimes too much editing eg: 3:02 i had to tilt my head to be able to read it. it looks cool but unnecessary