Factory Method Pattern - Design Patterns (ep 4)

  Рет қаралды 557,952

Christopher Okhravi

Christopher Okhravi

Күн бұрын

Пікірлер: 794
@thekonax5006
@thekonax5006 4 жыл бұрын
This guy is already speaking in 1.5 speed. You are the best Christopher! Thank you
@madhusudanratnalu400
@madhusudanratnalu400 3 жыл бұрын
Hehe
@madhusudanratnalu400
@madhusudanratnalu400 3 жыл бұрын
I could not able to here properly in 1.25x too😄😄
@andrejuha164
@andrejuha164 3 жыл бұрын
@@madhusudanratnalu400 you took me my words :)
@andrejuha164
@andrejuha164 3 жыл бұрын
@@madhusudanratnalu400 then is not boring.
@a.nk.r7209
@a.nk.r7209 3 жыл бұрын
and here 1i'm watching it in 1.5x
@kareemjeiroudi1964
@kareemjeiroudi1964 4 жыл бұрын
BTW, whenever I need a reference for design pattern, I would actually go back and watch your videos instead of Design Patterns by the gang of four, because you're incredibly good at explaining Object-Orientation concepts. Please keep up your awesome work!
@phuctranbao7518
@phuctranbao7518 Жыл бұрын
Please know that you save my and so many others' lives. People, we need to protect this man at all costs!!!!
@tobylifers3390
@tobylifers3390 Жыл бұрын
This guy's energy is the best.
@BleachWizz
@BleachWizz 4 жыл бұрын
I think I'm understanding why you're such a good teacher. I can't identify how you're doing it, but you manage to move on and explain new things saying the same thing over and over and over again. But everytime you say it there's something new yo realise about it, the way you wrote the script of your videos (or just made them) is amazing.
@calexito9448
@calexito9448 3 жыл бұрын
Yesssss, i love to see the video once again and see that he was explaining the same concept from the beggining but i just did not understand
@nikeshdevaki
@nikeshdevaki 4 жыл бұрын
Nothing went to my mind when I watched this video for the first time. Then I went back and read this concept on "The Head First Design Patterns" book and then came back here. This time things are very relatable and visualizable. Now I following this method for all the patterns and its very helpful. I suggest the same for beginners.
@Nex_Addo
@Nex_Addo 5 жыл бұрын
I really appreciate you going through the logic of "Well why wouldn't we just do xyz", "we don't do that because then...". It really helped make it click that it's not just about being able to instantiate different sub-types, it's also about being able to instantiate them in specific, repeatable ways.
@FionaCat86
@FionaCat86 7 жыл бұрын
The example in the book confused me to no end, but you described this so clearly. I think the missing piece for me was understanding the power of encapsulating different strategies for object creation. Once I understood that, it all clicked. Thanks so much, I hope you will continue with more tutorials!
@SuperTurboCrash
@SuperTurboCrash 7 жыл бұрын
The editing in this video gave me heart palpitations.
@ChristopherOkhravi
@ChristopherOkhravi 7 жыл бұрын
+SuperTurboCrash Terribly sorry about that and I hope you are ok :) But hopefully the information per second ratio was quite high?
@tomiekk6255
@tomiekk6255 4 жыл бұрын
actually IMO it was pretty good, at least it's easier to not resign, or fall asleep when something is constantly happening. Perfect for my sleepy day like today:P Thanks @Christopher for this vid. I barely can remember when was the last time I was that much into viewing something on design patterns.
@loganfeiler2412
@loganfeiler2412 3 жыл бұрын
I actually found it quite entertaining to watch, partly because of all the jump edits, and the subject content was explained very well.
@Mitch_Crane
@Mitch_Crane 7 жыл бұрын
Thank you Christopher for another helpful explanation on patterns. I cannot imagine how long it takes to edit all these jump cuts. God bless.
@ChristopherOkhravi
@ChristopherOkhravi 7 жыл бұрын
Thank you for the kind words and the understanding :) It does take a long time ;) :)
@gurtelem3586
@gurtelem3586 4 жыл бұрын
​@@ChristopherOkhravi You should use jumpcutter to avoid wasting all this time :-) github.com/carykh/jumpcutter
@AFPinerosG
@AFPinerosG 3 жыл бұрын
Guys! Please read this comment until the end, I know it is long but it will be worth your time if you really want to learn. I love these videos but this video is WRONG! This is a MISINTERPRETATION of the Factory Method pattern. This is NOT the purpose of the pattern, this is a very common misunderstanding. Be careful. I'm telling you this because I'm reading it from the Gang of Four Design Pattern book, I have it in my hand right now. Where did this video go wrong? 1. When it said that the problem this pattern solves is isolating the complexity of the creation. This is NOT the purpose. Isolating the creation of the objects is the responsibility of the Abstract Factory, not Factory Method. 2. When he said that a factory method can return several types of Products. No!! The factory method should return a SINGLE Product type (this is a little lie, but bear with me) The problem that is solved by this pattern is that the Abstract Creator can't know which Concrete Products should be used by each Concrete Creator, so it let's the Concrete Creators define the type of Concrete Product to be used via a factory method, which is an abstract method (Java). Let's say I have a Zoo class (Abstract Creator) and I have multiple types of Zoo: DogZoo and CatZoo (Concrete Creators). I also have the class Animal (Abstract Product) and the classes Dog and Cat (Concrete Products). Also, the Zoo has a List of Animals. OK, so let's say the Zoo has a method SpawnAnimal() that creates a new animal and adds it to the Animal List. But... Wait... Zoo doesn't know which type of animal it should add to the list! Does it add a cat? a dog? a parrot? Zoo can't know! So Zoo says "OK I will define a factory method createAnimal() so that my subclasses can tell me which type of Animal they want to use when I spawn an animal". So the DogZoo will return a dog in that createAnimal() method. The CatZoo will return a cat. Then when the Zoo calls the SpawnAnimal it creates the new animal with its createAnimal function. That's the idea of this method. The ConcreteCreators tell the AbstractCreator which ConcreteProduct to use!!! That's why the definition says "let subclasses define the ConcreteProduct". The purpose is NOT about isolating the creation in a separate Factory class!!! The purpose is NOT to allow switching factories on runtime to change from one behavior to another!!! Now that I have your attention. I lied when I said that the factory method can only return a single type of Concrete Product. There is actually a variation called the "Parameterized Factory Method" but it requires a parameter to tell the Factory Method which type of object to return in case a Concrete Creator is compatible with multiple Concrete Products. Going back to my example it would be something like FarmZoo and CityZoo. The farm zoo is compatible with Dog, Pig and Sheep. The CityZoo is compatible with Lion, Zebra, Hippo and Giraffe. The createAnimal() would now be createAnimal(type). That's it. So now when Zoo wants to spawn a new Animal you can tell it which type of animal to Spawn. But it won't let you spawn an animal that is not allowed. Now about the isolation. The Abstract Factory pattern DOES isolate the creation logic, thus, the clients create the factory and expect the factory to return a desired object to them. In the factory method there is NO client that consumes a factory expecting an object to be returned. In the factory method pattern the client of the factory method is the Abstract Creator!! The abstract creator is literally the class that "consumes" the factory method implemented by the subclasses. In other words, Christopher has created an Abstract Factory in which the Concrete Factories have a single Factory Method. Keep in mind that Abstract Factory can be implemented as a collection of Factory Methods OR as a collection of Prototypes. Please, Guys, I hope you understood this because this is a HUGE misunderstanding in the industry and most Juniors think they understand Factory Method but they really don't, they constantly confuse it with Abstract Factory because even smart teachers get it mixed up. I hope this was clear :) If you didn't understand, my advice is to go and read the Design Patterns: Elements of Reusable Object-Oriented Software book.
@MorganFreemanIsLife
@MorganFreemanIsLife 3 жыл бұрын
@@AFPinerosG omg ur right
@jvsnyc
@jvsnyc 3 жыл бұрын
@@AFPinerosG I regret I can only give this one Thumbs up!
@KellsCode
@KellsCode Жыл бұрын
This man is a true teacher. That's how it's done.
@shankar7435
@shankar7435 11 ай бұрын
I completely agree with the fact that the book's example is causing more confusion than understanding. Your explanation at 5:35 is legendary and that's all I wanted to understand this pattern. Thanks a ton for that.
@Sam-pq2pk
@Sam-pq2pk 10 ай бұрын
I come from other videos where everybody is giving great comments however the video is trash. I finally came to the right place where the explanation is actually good. Thank you Chris you should build a Java course someday!
@shanm4629
@shanm4629 3 жыл бұрын
I realized this is the best explanation after watching bunch of other videos on the same topic for couple of days. Thanks for making such a quality video on Factory Method Pattern. At roots I propose to use this when 1. The client program is only interested in what kind of object is required, rather than what exact object is required. Best Example: I need level4 obstacle and not really bother to tell anything more than that. 2. When The client program is more concerned about how they co-relate when they get created more than one. Ex: random Animals are expected rather balanced animals from a Factory. Awesome explanation. Thanks.
@ringo.gg.
@ringo.gg. 7 жыл бұрын
Dude you are fuckin amazing, I haven't found any other channel that explains and make clear the concept like you did. Hope you make all the g.a.m.m.a patterns on this series, cheers !
@ChristopherOkhravi
@ChristopherOkhravi 7 жыл бұрын
Thank you! Will do :)
@pionapior
@pionapior 7 жыл бұрын
Like before a watch because you are a legend !
@ChristopherOkhravi
@ChristopherOkhravi 7 жыл бұрын
:D
@ecsweb-studio2732
@ecsweb-studio2732 7 жыл бұрын
That man is amaizing he is real great actor. Holywood is mising real great actor.
@aymansafi2998
@aymansafi2998 6 жыл бұрын
let hem here dude so he helps us in programming stuff :D
@gytisdobrovolskis5933
@gytisdobrovolskis5933 6 жыл бұрын
Goddamn the factory pattern is already quite complicated here. And now I checked on some pluralsight tutorials - and there are a lot more complications, pitfalls and ways to do it. I think I will skip this pattern for now.
@ajayc815
@ajayc815 22 күн бұрын
You're an absolute legend, even from seven years ago 🥰🥰🥰
@mbesurich
@mbesurich 3 жыл бұрын
This is the best explanation of this pattern! What could be better? Personaly for me - to show an example of what different way of creating products can contain different factories. This could help me to understand more clearly the benefit of using factories versus creating straight the products. But anyway, thank you very much for such understandable information delivery!
@asrajan55
@asrajan55 6 жыл бұрын
Excellent, excellent, excellent lecture! Takes the time to introduce, repeat, cite examples, repeat.... No stupid power point slides... Talks to you and uses his hands and mouth to clearly explain...
@talyakatz8387
@talyakatz8387 3 жыл бұрын
Im a CS student and you explain it 10000x better than my lecture. Thank you!!!!
@GeaForce
@GeaForce 2 жыл бұрын
Christopher: Check this book, it's really easy to understand Also Christopher: Man, the examples on the book are catastrophic
@pavel2747
@pavel2747 5 жыл бұрын
The examples of factory method and abstract factory patterns provided by this book are the most convenient and understandable ones I've ever seen. And I: 1) have seen dozens of them; 2) am not from NY, Chicago etc. I'm not even from USA.
@colococolo
@colococolo 6 жыл бұрын
A 100% agree with you on that the example the book gives is rather hard to relate to. Your explanation helped me understand the factory patterns much better. Thanks a lot!
@SavageStyle77
@SavageStyle77 6 жыл бұрын
Looks like you high but I was surprised how clearly you understand what people need to know, what they struggle with - all your examples are TOP. And how clearly you explaied everything! One of the best teachers I ever saw. Recommended!
@kensearle4892
@kensearle4892 11 ай бұрын
Thank you! Ex: During the registration of users, 90% of our clients were exactly the same. However, we had a few custom clients who required us to save some extra registration fields and an extra registration page. Instead of giving those clients their own copy of the system, the factory pattern was used to instantiate those custom clients, which was determined by their domain name. I can't take credit for the choice but it was an interesting way to instantiate the custom Registration objects along with the standard Registration object. P.S. There were several different starting pages due to the custom clients, so using the factory pattern helped with code reuse.
@kuntalshah07
@kuntalshah07 7 жыл бұрын
Dude, This is the best design pattern lecture series I saw till now
@ANKITRAJPUT-tu2bk
@ANKITRAJPUT-tu2bk 7 жыл бұрын
Brother , you are the best tutor for design pattern , i was facing so much difficulty with Head first , but now i got a new head to make me understand .. Thanks and keep the good work.
@aniruddhabhattacharjee3729
@aniruddhabhattacharjee3729 3 жыл бұрын
I came here after going through the HFDP book and somehow although having gone through the pattern twice, it was not very clear to me. It's a great content, 27 mins worth every second, gives a very clear idea going from top down approach to the design pattern. Very well explained, thank you.
@hamzac.4555
@hamzac.4555 4 жыл бұрын
I was looking for a real tutorial about design pattern, when you said dont use static method, I subscribed and gave a like. Keep it up bro !
@40ozhemlock
@40ozhemlock 3 жыл бұрын
that was a moment of clarity for me too
@mouhssine04
@mouhssine04 2 жыл бұрын
Hello Christopher, you've really made my day, your explanation is quite stunning, great thanks for you mister, From now on, no confusion anymore about Factory Method Pattern.
@ЮлияВадимовнаОсновская
@ЮлияВадимовнаОсновская 10 ай бұрын
I love that you move so much while speaking, it helps me get less distracted THank you for your explanatoin, it was really useful and easy to understand!
@nishantsingh1453
@nishantsingh1453 6 жыл бұрын
The way u hold on to user's attention level is just impressive !!
@neon_code
@neon_code 3 жыл бұрын
I was reading the book and got confused a lot , now I watch your videos first then read the book. Thanks!
@paraspatel5763
@paraspatel5763 4 жыл бұрын
This was by far the best explanation of factory method pattern I found on YT. Thanks.
@IamMuldeh
@IamMuldeh 7 жыл бұрын
Going to recommend your channel to all of my class mates.
@NoleoTheDog
@NoleoTheDog 2 жыл бұрын
Fan of your details and expressions. It can be seen that you do it by heart and how much you love being a teacher.
@mahipparekh2167
@mahipparekh2167 3 ай бұрын
I read the book, I see your videos and then I code & make notes. Thank you once again for this treasure of resources. Lots of respect ➕➕
@mirzaaqeel
@mirzaaqeel 3 жыл бұрын
You are a teacher.... Hats off to your way of explaining and fitting in examples... perfectly....Thanks a lot.
@obinnaubah9045
@obinnaubah9045 5 жыл бұрын
The Asteroid example really helped drive home the point. I'm still not completely clear about a lot of things but I have a lot more clarity. Thank you very much!
@safakhan8177
@safakhan8177 3 жыл бұрын
Thank you Christopher! The example of the game development is brilliant! I think I will always keep that bit in mind whenever I hear the term factory.
@justai3766
@justai3766 3 жыл бұрын
Your communication style is amazing. The way you explain these concepts is one of the best. Thank you!
@thehumblechannel3441
@thehumblechannel3441 5 жыл бұрын
I really like the way you explain why Factory method is superior than Simple Factory. It really clears the cloud for me
@rohitkalya
@rohitkalya 3 жыл бұрын
Very much clear and now i understand why you said ... read first "strategy design pattern". Thanks
@sastashroud7646
@sastashroud7646 5 жыл бұрын
dude i am indian and these video lecture on design pattern really saved my life no one has taught as well as you have thank you bro really appreciated your work
@ChristopherOkhravi
@ChristopherOkhravi 5 жыл бұрын
Thank you for the comment. I’m very glad to hear that 😊😊 Thanks for watching
@sastashroud7646
@sastashroud7646 5 жыл бұрын
@@ChristopherOkhravi your lecture really helped me I attempted every question on design patterns thanks
@mannyfay2524
@mannyfay2524 9 ай бұрын
You explain this topic super well and I like your speed of speaking very much!! If you want to keep evolving your way to make such awesome tutorials, please avoid your huge amount of jumping because of cutting your videos.
@jagmagana
@jagmagana 6 жыл бұрын
Thanks for this design patterns series, i downloaded all videos because i cant lost this treasure...
@Mohamed-Maghrebi
@Mohamed-Maghrebi 4 жыл бұрын
WOW MEN , I DON't UNDERTUND GOOD ENGLISH, BUT I LEARNED MANY THINGS IN YOUR VIDEO, YOU HAVE A GIFT OF SHARING IDEAS, THANK YOU
@aliki212
@aliki212 4 жыл бұрын
Amazing work!Crystal clear explanation, personalized and out of this world editing!I usually put the videos at 1.25 speed to actually keep my ear on them - yours is purely A+!Cheers!!!
@drapala97
@drapala97 7 ай бұрын
i love this channel so much, Mr. Okhravi is a bless for the community. God bless you
@abhishekrajbhanu1452
@abhishekrajbhanu1452 Жыл бұрын
I admire your ability to use effective and generic analogy to make your audience understand the concept... Just requesting you to post complete video on SOLID principle .
@yanavalasatava9465
@yanavalasatava9465 6 жыл бұрын
You are amazing and very charismatic (which is important) teacher! For someone who is new to programming and patterns your videos are of a great help! Thank you!
@sahilkaul6199
@sahilkaul6199 6 ай бұрын
god bless you christopher, i could never understand why we needed this pattern. Thankyou for making it so clear :)
@AC-xx1uo
@AC-xx1uo 3 жыл бұрын
Thank you for this!! I’m an absolute beginner with OOP and this is one of the only videos I’ve found that helps it make sense at my level. The visuals and examples are so great. You rock!
@itisprofile
@itisprofile 5 жыл бұрын
Very clear explanation! I haven't found any other channel or video that explains the concept like you did.
@JorgeGarcia-rh1gu
@JorgeGarcia-rh1gu 5 жыл бұрын
So yeah, amazing explanation, away from the technical and complex words present in every article I've read so far. It's just the perfect vocabulary, the perfect explanation in conjunction with the perfect examples. Good job buddy, keep it that way
@ChristopherOkhravi
@ChristopherOkhravi 5 жыл бұрын
Much appreciated. Thank you for the kind words, the detailed feedback and for watching of course 😊😊😊
@brunon.8962
@brunon.8962 4 жыл бұрын
This guy is actually better than the book itself.
@luisfelipedasilva7128
@luisfelipedasilva7128 2 жыл бұрын
You´re incredible, man. The way you teach is awesome. I can´t get away from the video, i just want to watch more and more
@russiafromtheinside2776
@russiafromtheinside2776 4 жыл бұрын
It worth watching not even for pattern understanding but for the plot. I was like - wow, what's going to be next with these asteroids and animals? Your expressions are just amazing. Thank you very much. Subscribed.
@SaurabhGuptaicecool
@SaurabhGuptaicecool 4 жыл бұрын
Sir, you are a life savior. Thank-you.
@honey30prachi
@honey30prachi 6 жыл бұрын
i just love your way of explaining difficult things. Seriously these videos are very helpful
@KuzyoYaroslav
@KuzyoYaroslav 3 жыл бұрын
This is just awesome, I have never thought its possible to explain those patterns so interesting with just white board. Thanks for you work.
@JeffreyConcerto
@JeffreyConcerto Жыл бұрын
Great teacher! You did an excellent job breaking down the pattern, and I completely agree that the HeadFirst examples of Pizza and Pizza Stores are terribly confusing and uninspiring compared to their other examples.
@ziadesaa8776
@ziadesaa8776 7 ай бұрын
After 7 years still useful and priceless ❤❤😊
@lapidations
@lapidations 2 жыл бұрын
This was SO much better than the book
@mercury801115
@mercury801115 2 жыл бұрын
I finally understood the difference between simple factory and factor method. Thank you!
@czarlp
@czarlp 7 жыл бұрын
You are amazing as a teacher dude, I find it very hard to not understand and follow everything you are saying, it's almost intuitive. Keep up with cutting the video in a lot of pieces, I think it makes the learning process easier if you "shoot" sentences instead of sending a big package of words. I don't know if that makes sense but anyway, keep up with whatever you do. Kudos to you.
@sharathchandra5314
@sharathchandra5314 2 жыл бұрын
I am new and i am late. But i am hypnotized and will be sticking to your rest of the videos 😀
@bloomtrading
@bloomtrading 6 жыл бұрын
this is the best channel ever
@Khatsil
@Khatsil Жыл бұрын
the asteroid example is really good!
@dark808bb8
@dark808bb8 3 жыл бұрын
I think it is really interesting how you show that various types of creators and products can reduce to a few creators and products with different properties.
@elinorkent7188
@elinorkent7188 5 жыл бұрын
the best tutorial for this. watched many, but now i actually understand it.
@noknata3240
@noknata3240 2 жыл бұрын
i love you i love the way you teach you. You make complex notion ease and you english and exemple are simply and basic. good job
@random-bucket5998
@random-bucket5998 4 жыл бұрын
You are just awesome .. I saw all the videos on design pattern.. I understand just like a miracle happened and enlighten my mind..
@georgebrandon9675
@georgebrandon9675 2 ай бұрын
Great video! Still the best explanation on the internet
@OritNeeman
@OritNeeman 4 жыл бұрын
YOU ARE AWESOME!!! Thanks to you I now REALLY understand design patterns. Everything you teach is so clear and it's fun and interesting to learn from you. Thank you so much. You are the best.!!!
@adewaleayokanmiadeleye2841
@adewaleayokanmiadeleye2841 2 жыл бұрын
Thanks for creating this video. Certain concepts are difficult to understand if the examples used are relatable to a certain group of people.
@Coolharshit149
@Coolharshit149 3 жыл бұрын
Wow, i really felt when you said about the pizza example from the book. You cleared all the doubts
@andypye4006
@andypye4006 2 жыл бұрын
Thanks for these videos Christopher. You have a superb, enthusiastic delivery style !
@miloszbacnik3366
@miloszbacnik3366 6 жыл бұрын
I must say, that I've jumped directly to GOF book. Things were blurry. But, this whole video set makes things way more clearer. So, a BIG thanks from me :)
@gregridd
@gregridd Жыл бұрын
You are a great teacher Christopher Okhravi!
@nipulsindwani117
@nipulsindwani117 4 жыл бұрын
The best design pattern series.
@WillEhrendreich
@WillEhrendreich 4 жыл бұрын
These are the best explanations of these theories on KZbin, I swear. Thank you so much for sharing your knowledge with us all.
@wearemiddream
@wearemiddream 3 жыл бұрын
i've been trying to understand this for a minute and you just nailed it dude, thank you!
@mydexcicdeja
@mydexcicdeja Жыл бұрын
Excellent thank you for the clarity in your explanation and reconfirmation during the session
@kenya6749
@kenya6749 6 жыл бұрын
This helped SOOO much before my exam tomorrow! THANKS!!
@paull923
@paull923 3 жыл бұрын
by far the best videos regarding design pattern
@greddee
@greddee 7 жыл бұрын
Tack för dina videos! Det hjälper verkligen en datastudent! :)
@ChristopherOkhravi
@ChristopherOkhravi 7 жыл бұрын
Inga problem :) Tack för kommentaren :)
@guilhermerenna
@guilhermerenna 3 жыл бұрын
Your videos are awesome! I have watched them all in the past, and I continuously come back to them and use them as a reference. I can't thank you enough!
@alexfish7792
@alexfish7792 5 жыл бұрын
6:59 - I had this exact opinion when I first study this chapter, so I thank you for confirming I'm not insane!
@alexivaylov688
@alexivaylov688 4 жыл бұрын
The examples they give are like "New York pizzas are thin crust" and "Chicago pizzas are thick crust". This IMO is bad because it makes it sound like the produced concrete objects are different (like they have been decorated with decorator pattern or something) while the factories stay the same. The examples in this video are better because they show the variation in the factories without decorations to the produced objects.
@Tanya_5091
@Tanya_5091 6 жыл бұрын
Why haven`t I found this channel earlier? So useful, the best explanation ever
@AnhTu-en9gk
@AnhTu-en9gk 5 жыл бұрын
give this man a medal I always come from HFDP to here
@shubhamsingh-nd6wo
@shubhamsingh-nd6wo 2 жыл бұрын
Thank you so much man. Every single video of yours makes me feel like I found a gold mine!
@stewiegriffin6503
@stewiegriffin6503 7 жыл бұрын
without animals and cars there wouldn't be OOP Every try to explain OOP uses animals and cars.
@kmkblack
@kmkblack 6 жыл бұрын
Duh! Mammal enough?
@jason_v12345
@jason_v12345 6 жыл бұрын
I know, right? And what's funny is that real-world OOP rarely deals with such familiar, real-world abstractions.
@madsteeez
@madsteeez 5 жыл бұрын
without OOP there wouldn't be animals nor card.
@madsteeez
@madsteeez 4 жыл бұрын
@@jason_v12345 I do. I work for Lufthansa Technik. I abstract aircraft engines.. I love it
@darkoazure9902
@darkoazure9902 4 жыл бұрын
Great catch! But I'm not :)
@indramaniarora7901
@indramaniarora7901 4 жыл бұрын
Best channel for design patterns. Sad there are no new videos from him
@rsdntevl
@rsdntevl 7 жыл бұрын
The game example gives good insight on the dynamic nature of the factory method!
@ChristopherOkhravi
@ChristopherOkhravi 7 жыл бұрын
+rsdntevl Cool! I'm glad to hear. Thanks for the specific feedback :) and thanks for watching :)
@joaolima7194
@joaolima7194 11 ай бұрын
Congratulations my friend! Every class I am more interested in design patterns and impressed with your control of the topic and the way you teach! Thanks a lot for all your classes, I will see all your series about design pattern and try improve my knowledge
@ahmedbishree9429
@ahmedbishree9429 2 жыл бұрын
I read around two different books and a few video courses but believe me I didn't understand as much as I watched your first 20 minutes many thanks.
@atulmishra6740
@atulmishra6740 6 жыл бұрын
Just Wow! The Animal class example was a bit lame to start off, but the way you ended up by co-relating the same with the game example was awesome. This is the by far most easiest way of explaining the Factory method pattern along with a very sound and interesting example.
@Monk-wv4ub
@Monk-wv4ub 2 жыл бұрын
You are best guru for design pattern .
@mtanzil
@mtanzil 2 жыл бұрын
Thanks for these videos! I'm currently going through the design pattern series and I'm really enjoying them! IMO the examples in this video was very confusing except for the game example. The way I see the factory method design pattern is a "Factory of factories". An example that might be more suited is literally a manufacturing company. Let's say you have a manufacturing company that has multiple factories. Each factory is responsible for a different product's production. Just to use a real life world example, we could have a wood product manufacturing company. This company makes anything from wood such as photo frames, wood furniture, and dowels. In the photo frame factory, we could have sub-products (different sizes, colors, shapes) or related products (shadow boxes) to it. A factory "Product" class/interface can be responsible for the production of these various products while a factory "Parts" class/interface would be responsible for creating the various parts of the products. They can be common or unique parts but they're still all used in various products.
Abstract Factory Pattern - Design Patterns (ep 5)
25:54
Christopher Okhravi
Рет қаралды 318 М.
Singleton Pattern - Design Patterns (ep 6)
20:09
Christopher Okhravi
Рет қаралды 253 М.
My scorpion was taken away from me 😢
00:55
TyphoonFast 5
Рет қаралды 2,7 МЛН
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
Adapter Pattern - Design Patterns (ep 8)
26:36
Christopher Okhravi
Рет қаралды 247 М.
Decorator Pattern - Design Patterns (ep 3)
54:35
Christopher Okhravi
Рет қаралды 491 М.
Strategy Pattern - Design Patterns (ep 1)
35:11
Christopher Okhravi
Рет қаралды 1,5 МЛН
Command Pattern - Design Patterns (ep 7)
39:12
Christopher Okhravi
Рет қаралды 274 М.
Observer Pattern - Design Patterns (ep 2)
49:47
Christopher Okhravi
Рет қаралды 574 М.
What is the Factory Pattern? | Software Design Principles
26:48
Be A Better Dev
Рет қаралды 29 М.
Facade Pattern - Design Patterns (ep 9)
16:19
Christopher Okhravi
Рет қаралды 184 М.
Factory Pattern in C# with Dependency Injection
1:07:33
IAmTimCorey
Рет қаралды 111 М.
The Factory Pattern in Python // Separate Creation From Use
14:58