Abstract Factory Pattern – Design Patterns (ep 5)

311,272
0
Publicado 2017-05-28

Todos los comentarios (21)
  • @worldown
    I study and improve not only patterns but also English. Thank you for clearful and not boring lessons =)
  • @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
    Finally understood the difference between Factory Method Pattern and Abstract Factory Pattern. Thank you very much. Great series!
  • 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.
  • @neonskyscape
    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!
  • @slipperydippery
    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!
  • @adamsolkar
    Please include code examples as they really help cement the idea, like you did in decorator pattern.
  • @ayushdayani7157
    The example of Dark and Light mode was beautiful. It gave the most clarity about the use case of abstract factory. Kudos!
  • @dmytrouchkin1415
    You got a talent to explaining difficult abstractions. Keep it up, man - result is incredible.
  • @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
  • @tivmego
    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
  • @faridiflex
    The best video that explains Abstract Factory pattern. Very well edited to keep the pace of video fast enough.
  • Men, Chris, your energy is infectious, lots of love. :goodvibes: Thanks a bunch
  • @AfriandiHaryanto
    Posted years ago, yet this one still the best explanation I found so far.. Thanks (a lot) Chris..!!
  • 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!! :)
  • Your teaching is better than all the teachers that i saw in 12 years of studying at Iran awful schools :) love you bro....
  • 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
  • @Hdjandbkwk
    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.
  • @Obsi995
    I swear it all made sense with that last themes example. Amazing.
  • @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!