Abstract Factory Pattern - Design Patterns (ep 5)

Video series on Design Patterns for Object Oriented Languages. This time we look at the Abstract Factory Pattern.
💙 BUY MY BOOK:
leanpub.com/the-object-orient...
► The playlist
• Design Patterns in Obj...
► Head First: Design Patterns
geni.us/nlbA6
► Design Patterns: Elements of Reusable Object-Oriented Software
geni.us/PsXmo
💪 Patreon Community
/ christopherokhravi
📚 Products I Recommend
geni.us/71ZXF

Пікірлер: 503

  • @worldown
    @worldown7 жыл бұрын

    I study and improve not only patterns but also English. Thank you for clearful and not boring lessons =)

  • @ChristopherOkhravi

    @ChristopherOkhravi

    7 жыл бұрын

    Thank you for the kind words and for watching :)

  • @joselosddrd

    @joselosddrd

    7 жыл бұрын

    I also improve patterns and English... you said why.. Well because We're learning English -__- xD

  • @mikekajzer

    @mikekajzer

    7 жыл бұрын

    this is no joke, this guy articulates words with speed of a Gatling gun and yet he's perfectly understandable. not even a single word gets ambiguous or hard to catch!

  • @akashchourasiya72

    @akashchourasiya72

    2 жыл бұрын

    LOL😂

  • @user-qz8uy9sf2w

    @user-qz8uy9sf2w

    Жыл бұрын

    Хорош

  • @mesesamboby
    @mesesamboby Жыл бұрын

    It's 2023 and I am watching the series (of course with pen and notebook ready). Thank you very much Chris! The value you add is huge.

  • @Alarith1988
    @Alarith19887 жыл бұрын

    Finally understood the difference between Factory Method Pattern and Abstract Factory Pattern. Thank you very much. Great series!

  • @ChristopherOkhravi

    @ChristopherOkhravi

    7 жыл бұрын

    I'm glad to hear. Thanks for sharing :) and thanks for watching :)

  • @MrAceman82

    @MrAceman82

    3 жыл бұрын

    It helped me also :)

  • @neonskyscape
    @neonskyscape3 жыл бұрын

    I have to admit (yeah I watch it now in 2020) that I really haven't seen any tutorial videos on YT that are as immersive and fun to watch as this one. I am a computer science student that likes to explore CS-related content and I accidentally stumbled upon your channel. I may say that these 25+ min videos are better structured than all the lectures I have attended at my University. Well done! I am a subscriber now! Thanks for creating and sharing this interesting content!

  • @adamsolkar
    @adamsolkar7 жыл бұрын

    Please include code examples as they really help cement the idea, like you did in decorator pattern.

  • @koruspring1519

    @koruspring1519

    5 жыл бұрын

    Second this. I know this is about abstraction but man.. the example is too 'abstract'.

  • @kapilpadaliya2387

    @kapilpadaliya2387

    5 жыл бұрын

    Watch Derek Banas Vidoes on Design pattern after every explaination.

  • @saganawski

    @saganawski

    5 жыл бұрын

    @@kapilpadaliya2387 thanks. Derek's demonstration really helped me

  • @sohamdatey9035

    @sohamdatey9035

    4 жыл бұрын

    check out this video For amazing content with code Example nicely presented kzread.info/dash/bejne/f65n24-sYc3Rm6g.html

  • @HippieInHeart

    @HippieInHeart

    2 жыл бұрын

    concrete factories, cement, did i accidentally walk into a construction supply shop or something? lol. but yeah, i agree, code examples would be pretty helpful.

  • @slipperydippery
    @slipperydippery3 жыл бұрын

    The UI example was so much clearer than the Head First pizza examples! This makes sense in a way that I can use it for my own projects, thanks!

  • @ayushdayani7157
    @ayushdayani7157Ай бұрын

    The example of Dark and Light mode was beautiful. It gave the most clarity about the use case of abstract factory. Kudos!

  • @ChristopherOkhravi

    @ChristopherOkhravi

    Ай бұрын

    Happy to hear. Thanks for watching 😊🙏

  • @tivmego
    @tivmego7 жыл бұрын

    Man, this video series might be ever green when you are done with it! youtube has connected us in an observer pattern in that since I subscribed, I get updates on your current videos :D

  • @ChristopherOkhravi

    @ChristopherOkhravi

    7 жыл бұрын

    +tivmego haha thanks! Makes me glad to hear :) Thanks for watching :)

  • @espritgaronne9975

    @espritgaronne9975

    5 жыл бұрын

    lol

  • @xavmanisdabestest

    @xavmanisdabestest

    3 жыл бұрын

    I need to subscribe too! I was constantly polling his channel for new videos like a scrub

  • @dmytrouchkin1415
    @dmytrouchkin14156 жыл бұрын

    You got a talent to explaining difficult abstractions. Keep it up, man - result is incredible.

  • @nametakenfan
    @nametakenfan Жыл бұрын

    Freaking HERO - I have been banging my head against the wall for about 2 hours trying to understand Abstract Factory Patterns and you managed to clarify everything in about 25 min. The recap of the definition at the end really brought everything together. Thanks for helping me not fail my CS course

  • @albinsjostrand7050
    @albinsjostrand70506 жыл бұрын

    Loving these walkthroughs! Perfect for the courses I'm taking that always have very unclear explanations, but where you make it very clear!

  • @ryanconnollyatwork1356
    @ryanconnollyatwork13566 жыл бұрын

    You have such a great way to teach and keep the user engaged. With the ever important point of the "Why" not just the "How", this video is one of the best in this subject IMO. Thank you very much for sharing!

  • @vicinityconcepts1165
    @vicinityconcepts11655 жыл бұрын

    This is a great video, you covered the pattern very well. I wanted to add one additional point which you will see in many implementations of this pattern: When you have multiple concrete implementations of a factory, you have the same problem you had when faced with multiple concrete implementations of a product. You want to get the type of product you need, but don't want to get your hands dirty with the business logic involved in creating it. With multiple concrete factories, how can you apply a polymorphic solution for creating the correct type of factory? The answer is a factory of factories. The same way we abstractify the logic for creating products, we can abstractify the logic for creating factories that produce families of products. Let's use your operating system example: You want platform-specific UI's, and have created UI factories for Mac OS, Linux, and Windows. Maybe you also have subclasses of those factories for things like light mode, dark mode, accessibility mode, etc. When the program begins, you detect the operating system and graphical settings, and send those details to your factory of UI factories. You are given back the correct concrete UI factory implementation specific to your needs, and can start producing UI elements. Without this extra polymorphic layer, you may be faced with the same problem that the factory pattern was devised to solve.

  • @AbdAllahBoda

    @AbdAllahBoda

    3 жыл бұрын

    I love it when people write down what I'm saying in my head, makes me feel connected to the world somehow. :) Thanks for sharing your knowledge. :)

  • @cdarius0
    @cdarius05 жыл бұрын

    25:00 really hits the nail on it's head. Thank you for the nice work!

  • @shubhambhardwaj8990
    @shubhambhardwaj89905 жыл бұрын

    The explanation that why we go from factory method to abstract factory is what really helped wrap my head around the concept, Thanks a ton!! :)

  • @AfriandiHaryanto
    @AfriandiHaryanto3 жыл бұрын

    Posted years ago, yet this one still the best explanation I found so far.. Thanks (a lot) Chris..!!

  • @_overide
    @_overide6 жыл бұрын

    Possibly the best explanation I've ever seen. Thank you Chris!

  • @Jacob-bz5hn
    @Jacob-bz5hn Жыл бұрын

    Literally been trying to wrap my head around the abstract factory pattern for the longest time and your video finally helped me understand what it is and why is is useful!!!!!💯I love your teaching style!!!!! Thank you so much!

  • @faridiflex
    @faridiflex6 жыл бұрын

    The best video that explains Abstract Factory pattern. Very well edited to keep the pace of video fast enough.

  • @sorskilla
    @sorskilla7 жыл бұрын

    You're really onto something with your design patterns series here. Keep on keeping on. I especially appreciate the fact that you compare the implementation to real world applications. For a follow up series I'd suggest revisiting the patterns after a while and focusing on the comments, most common questions, misconceptions, etc.

  • @youcefsb4708
    @youcefsb47084 жыл бұрын

    It must be a hell of a feeling to read all these comments and see how helpful you are to others, keep it up please, you are good at this, thank you!

  • @briannkurunungi2837
    @briannkurunungi28372 жыл бұрын

    Men, Chris, your energy is infectious, lots of love. Thanks a bunch

  • @whatshappening5712
    @whatshappening57123 жыл бұрын

    You deserve all 3 buttons from KZread

  • @lankymorley
    @lankymorley7 жыл бұрын

    I love this series, thanks for your super clear explanations. I'm a fan of the jump cuts, they keep my mind from wandering.

  • @konzinovmaverick4539
    @konzinovmaverick45397 жыл бұрын

    Just want to thank you again for this new video. You still doing good job and the draws in the video were very meaningful. I'm surely gonna be design pattern expert at the end of this serie. Cant wait for the next one

  • @rh7201
    @rh72016 жыл бұрын

    your example of dark theme and light theme of an application is the most make sense of application development. Thank you.

  • @riteshsharma929
    @riteshsharma9294 жыл бұрын

    As a novice to design I often have hard time thinking where this thing could be applicable. The example in end of themes in UI was of a great help. Thank you. 😊

  • @rafatrench
    @rafatrench7 жыл бұрын

    The method you use for teaching is very dynamic, but at the same time through, thanks to that I was easily able to understand the whole concept. Keep it up!

  • @Obsi995
    @Obsi9955 жыл бұрын

    I swear it all made sense with that last themes example. Amazing.

  • @ChristopherOkhravi

    @ChristopherOkhravi

    5 жыл бұрын

    I’m glad to hear! That’s awesome. How lucky 😊😊 Thanks for watching 😊

  • @obamabinladen5055
    @obamabinladen50553 жыл бұрын

    This is top notch stuff. Your viewpoint and how you think about it makes the patterns clearer.

  • @rajeev7842
    @rajeev78422 жыл бұрын

    This is some premium explanation making complex topics simple to understand, and I love the way you repeat things so that the idea gets cemented into our head, hats off to you sir, great explanation I hope you never stop doing these, We novice developers need people like you.. :)

  • @idanlazimi
    @idanlazimi7 жыл бұрын

    By far the one of the best teachers on KZread. Thanks

  • @arshadyusuf4803
    @arshadyusuf48036 жыл бұрын

    Wow Christopher.. You are the man!! I tried in couple of other places, but didn't quite grasp AFP. But you made this so simple..! You don't know how thankful I am to you!!

  • @leonardoherreraornelas4667
    @leonardoherreraornelas46675 жыл бұрын

    Thank you Chris for this series of video, In this chapter in the book, they make an example using something like an IngredientFactory, something like that i was really impressed because the "Ingredient" receives a concrete factory by passing it in the constructor. That way the Pizza factory was able to cook itself according to the contract that the concrete factory already implemented. I think that specific part of the example from the book was really awesome and i recommend showing that part. Anyway, really thanks for sharing your knowledge on design patterns you're really good at explaining.

  • @gh8326
    @gh83263 жыл бұрын

    Estaba viendo videos de este patrón, vi tu video y dije: pues veamos si logro entender después de varios videos y solo te puedo decir que eres un genio explicando. Te estoy enormemente agradecido...

  • @vislobokovaleksander
    @vislobokovaleksander4 жыл бұрын

    I tried to understand this via wikipedia's diagrams and descriptions, but it was too overwhelming for me couple of weeks ago. And now they are REALLY simple. Great thanks to you, man. You are really sticking to KISS principle :)). thank you again

  • @CostruttoreFolle
    @CostruttoreFolle3 жыл бұрын

    Awesome video! I had seen only the factory design pattern videos but I cant wait to see the others! Excellent teacher

  • @mantur8207
    @mantur82076 жыл бұрын

    Christopher your last example in the video on Mobile App theme is EXCELLENT. It clarifies the real time use of abstract factory pattern and also why we can not use factory method pattern in this example.

  • @mayankkukadia
    @mayankkukadia7 жыл бұрын

    Thanks a lot Christopher for the perfect explanation on Abstract Factory and Factory Method pattern. I have seen dozen of tutorials on Abstract Factory pattern but most of them are confusing or miss leading. After watching this video, now I perfectly understood Abstract Factory pattern. Thank You again.

  • @sriplano748
    @sriplano748 Жыл бұрын

    Yet another awesome video!! When I listen to your explanation it makes me really think as opposed to just be a passive listener. Thank you very much Sir!!

  • @salepare
    @salepare6 жыл бұрын

    I'm loving this series, thank you so much !! :D

  • @Vahi
    @Vahi6 жыл бұрын

    I am really impressed by your way of teaching Really helped me understand the abstract factory and factory methods pattern Glad I found your lessons on youtube Keep up the good work

  • @cassyojr
    @cassyojr5 жыл бұрын

    Great explanation, really clarified my doubts. good job!

  • @zondaken
    @zondaken Жыл бұрын

    Very good explanation. We had a deep discussion in lessons yesterday because there was the perception that abstract factories return factories but this was massively helpful.

  • @LavGupta08
    @LavGupta087 жыл бұрын

    Thanks again for the awesome video. I wish I had a teacher like you in university.

  • @Aruna721
    @Aruna7216 жыл бұрын

    Best design pattern tutorial series ever!

  • @kumarprateek1279
    @kumarprateek12795 жыл бұрын

    This playlist is really good for getting a start in design patterns.

  • @leviermonaites6832
    @leviermonaites68323 жыл бұрын

    I never knew someone with such a great speaking talent man, really really great!

  • @amraboughazala5986
    @amraboughazala59865 жыл бұрын

    for the arrows it can work if you selected arrows starting from concrete factories from the bottom only heading to product B and another starting points from top heading to productA. Good job you deserve all the good comments.

  • @ronironion
    @ronironion4 жыл бұрын

    Wow you make it soooo clear! I liked the theme example, this is a great example! Thank you 😊

  • @sachinjaybhay7439
    @sachinjaybhay74393 жыл бұрын

    Fantastic series of lectures... Really appreciate the efforts taken to bring out the essence of each pattern... The key I think is the problem, solution definitions and the relatable examples... Kudos

  • @riteshtyagi5439
    @riteshtyagi54396 жыл бұрын

    Amazing tutorials sir, the best I have ever seen for design patterns, this is exactly what I was looking for. Thank you so much

  • @MrDaffyduck69
    @MrDaffyduck696 жыл бұрын

    Thanks for your tutorials ... They are so interesting, you have the ability to keep my attention high

  • @kamildabek_
    @kamildabek_3 жыл бұрын

    I love the UI example i.e. dark theme factory vs light theme factory. Really grounds the concept!

  • @ambarishkapil8004
    @ambarishkapil80043 жыл бұрын

    Hey Chris, nice explanation. Absolutely love your big hand gestures and passionate rants.

  • @AnubhavShrivastava
    @AnubhavShrivastava6 жыл бұрын

    the way you speak and present is awesome :) thank you.

  • @ChristopherOkhravi

    @ChristopherOkhravi

    6 жыл бұрын

    Thank you very much. I appreciate it :) And thank you for watching :)

  • @kinty255
    @kinty2556 жыл бұрын

    I understand this pattern so much better now. Thank you for the great explanation!

  • @360theosiris
    @360theosiris6 жыл бұрын

    Another amazing video. Your way of explaining really makes things stick. Thank you! *Edit: and please don't listen to people saying you repeat yourself or overexplain things. In the first vid I kinda had the same feeling. But then i realized that's part of the genius and why, at the end of the video, everything is so clear! :)

  • @mark22390
    @mark223907 жыл бұрын

    Watched the entire series and I had to subscribe to your channel.... easy to understand and you give great examples. cant wait for the next video!!!

  • @urosmilic3300
    @urosmilic33003 жыл бұрын

    GREAT WORK MATE. You helped me a lot with these patterns, i didn't really understood them until i watched your series..

  • @EmpySoul
    @EmpySoul5 жыл бұрын

    Excellent video!!!! thanks for your time on creating these videos.

  • @rajnishkumar-rn2fm
    @rajnishkumar-rn2fm5 жыл бұрын

    I am watching your all videos on design patterns and concepts, you are genius . And thank you for these wonderful videos. Now eagerly waiting for your videos on system design concepts .

  • @kinvain
    @kinvain3 жыл бұрын

    The explanation is utterly great! And the final example is way better then any "abstract" pizza factory.

  • @ibrahim47
    @ibrahim475 жыл бұрын

    I'm reading the book and i felt like i drowned in an endless ocean of PIZZAS, and luckily i found your channel and now i'm able to skip the rest of the factory patterns part from the book. That was a great boost, Thank you :D Of course i'll move back and forth between this playlist and the book, it's really helpful

  • @chaitanyatanwar8151
    @chaitanyatanwar81514 жыл бұрын

    Thank you for making the understanding so easy.

  • @malkitsaggu
    @malkitsaggu5 жыл бұрын

    Very helpful to understand Abstract Factory pattern. Thank you.

  • @tomahawkay8455
    @tomahawkay84553 жыл бұрын

    Design Patterns : Never been easier with Christopher Okhravi Thank you sir for your high quality content and especially for your eagerness to make sure that the topics are understandable and enjoyable :)

  • @nicolabombace2004
    @nicolabombace20046 жыл бұрын

    Dear Christopher, Thank you for your amazing job. Your videos are very clear and personally I find it very useful to first watch your video and then read the book. Your explanation of both patterns (Factory and Abstract Factory) have been superb. The only minor feedback I have is that I would have loved to see some client code. :)

  • @enmanuelbolzonello4754
    @enmanuelbolzonello47543 жыл бұрын

    Thanks for all these videos talking about design patterns. Very good and clear explanation.

  • @daicaphong84
    @daicaphong846 жыл бұрын

    Thank you very much. Your Design Pattern playlist is very helpful.

  • @dp-bhatt
    @dp-bhatt6 жыл бұрын

    I think you explained the most difficult design pattern in the simplest way. Thanks again :)

  • @n0block
    @n0block5 жыл бұрын

    Something clicked in my mind while watching this video. Thank you.

  • @wellingtongamagomes7411
    @wellingtongamagomes74115 жыл бұрын

    This video provided us an excellent explanation about abstract factory pattern and the main points of difference between the abstract factory and the factory method, congrats brother. Thank you very much!

  • @rein29233
    @rein292335 ай бұрын

    Finally in forver i understood this concept. You are the only i have seen provide a really easy example that is applicable in real life.

  • @muratbagzat7661
    @muratbagzat76612 жыл бұрын

    Explained very well, and great time saver for me. Thank you!

  • @Jtoled0
    @Jtoled07 жыл бұрын

    Thanks again for making learning patterns even more entertaining :D

  • @TheBrahmadath
    @TheBrahmadath6 жыл бұрын

    How come I never knew about this channel? Good explanation dude!

  • @DominikRoszkowski
    @DominikRoszkowski7 жыл бұрын

    Thanks, great work!. I can't wait for the next one!

  • @piyushdanej3930
    @piyushdanej39304 жыл бұрын

    Beautifully explained with good example of UI controls.

  • @lmagiczlukas4891
    @lmagiczlukas48915 жыл бұрын

    Thank you very much. You help me to understand this pattern easier!

  • @crcrrajesh2008
    @crcrrajesh20087 жыл бұрын

    Thanks for sharing. Great insight and deep understanding.

  • @ChristopherOkhravi

    @ChristopherOkhravi

    7 жыл бұрын

    +Rajesh Kumar Thanks! I'm glad it resonates :) Thank you for watching :)

  • @patashish1
    @patashish16 жыл бұрын

    Excellent Explanation Chris ! Subscribed and Liked !

  • @ChristopherOkhravi

    @ChristopherOkhravi

    6 жыл бұрын

    Thank you. I'm glad. Welcome :)

  • @Julio-cu2hd
    @Julio-cu2hd6 жыл бұрын

    you rock! nice and clear explanation as always, thanks for your time and effort.

  • @maeeshameem1578
    @maeeshameem15783 жыл бұрын

    You are really really good.Thank you so much for this series,it would help many many students surely.

  • @saudnaeem
    @saudnaeem6 жыл бұрын

    I watched your videos and passed my design patterns Exam with good grade. Thank you so much for such great effort. Stay blessed

  • @ChristopherOkhravi

    @ChristopherOkhravi

    5 жыл бұрын

    That’s awesome! Congrats! 🎉🎊

  • @quirkymarshmallow9324
    @quirkymarshmallow93243 жыл бұрын

    I wouldn't really call it simple design pattern. But I can certainly see how valuable it is. Thanks for the video!

  • @ShyamSharma-pg1zu
    @ShyamSharma-pg1zu3 жыл бұрын

    Your teaching style is so nice and easy. Thanks a lot

  • @OutsidePawn
    @OutsidePawn Жыл бұрын

    I think the concept of Factories finally makes sense to me now. I can see how the process of creation of an object has been abstracted away. However, contrary to what I've read somewhere that it is meant to avoid the 'new' keyword, your explanation makes much more sense. I can see now how one might want to avoid 'new' keyword unnecessarily in order to have dynamic object creation code. Still, it is necessary to understand that you cannot completely avoid the 'new' keyword as the concrete factories themselves must be created at some point in the code. I think the key power of factories is their ability to provide a means of creating and using 'wishful' objects of classes that don't even yet exist in the code. Thanks a lot man.

  • @renarsdilevka6573
    @renarsdilevka65734 жыл бұрын

    You are excellent, Christopher, just brilliant

  • @rafaeldeconde8148
    @rafaeldeconde81485 жыл бұрын

    I love your videos! They are awesome some!!! Thank you for sharing all this knowledge !!

  • @utsavshrestha7162
    @utsavshrestha71624 ай бұрын

    Thank you. Much easier to understand as a visual learner.

  • @simaphore
    @simaphore Жыл бұрын

    Your explanation is brilliant!

  • @abhishekmiet
    @abhishekmiet3 жыл бұрын

    Loved the explanation, was struggling with Abstract factory for more than a day...

  • @mehdieskandari5620
    @mehdieskandari56203 ай бұрын

    Your lessons are great! Thank you so much.

  • @Hdjandbkwk
    @Hdjandbkwk3 жыл бұрын

    Thanks for the awesome videos! I think the main difference between Factory Method and Abstract Factory is that Factory Method relies on inheritance and let subclass decides how to create object through the factory method(s), whereas Abstract Factory uses composition, client gets an object that implements abstract factory interface and uses that object to create items. Abstract Factory is at a higher level since it is an object, while factory method is only a method.

  • @shristibaranwal2183
    @shristibaranwal21832 жыл бұрын

    Great experience... This is how we should be explained!!! Thank you

  • @helsonkumar8173
    @helsonkumar81733 жыл бұрын

    Cheers mate!!!!!! For giving us such a lovely definition......

  • @sanjeevsah2606
    @sanjeevsah26067 жыл бұрын

    Thank you so much for upload these videos.

  • @sushmitagoswami2033
    @sushmitagoswami20335 жыл бұрын

    you are the best teacher i have ever seen

  • @burakakyalcin
    @burakakyalcin3 жыл бұрын

    you, sir, are an amazing teacher. much thanks.