Great design pattern video! I might have to go find some Starburst candy now…
@DenaTollefson8 ай бұрын
Wonderful tutorial, Will! I like how you are building this lesson on the foundation you created with the candy factory store example from your original factory pattern video. Awesome real examples! 😀
@willtollefson8 ай бұрын
Thanks! Glad you liked the example :)
@redcrafterlppa3038 ай бұрын
But what is more abstract about that factory? It's just a factory that creates multiple related objects.
@willtollefson8 ай бұрын
Great question - I'm personally not a huge fan of the naming scheme for the various factory patterns. Its confusing since both the regular factory and the abstract factory can use either abstract classes or interfaces to abstract away concrete implementations in client code. The main thing to remember is that abstract factory takes the regular factory a step further by "providing an interface for creating families of related or dependent objects without specifying their concrete classes". That's an almost direct quote from the Gang of Four design patterns book. Hope this helps!