Here we are again looking at another Design Pattern for software. Again from our friend Christopher Okhravi getting into the nitty gritty of the “Factor Method Pattern” and how it works using logic and examples all from the book “Head First Design Patterns”. I picked this because the last one of these I watched I thought really worked for explaining the Strategy Pattern for me so I wanted to give another one a watch for some more complicated patterns. First Mr.Okhravi walks us through how exactly a Factory Pattern works where we have a series of classes that all implement the same superclass and we then create these products through separate classes that instantiate them called a “Factory”. But when we instantiate one of these classes we don’t actually know which class we want to instantiate, we just need some kind of logic to produce them inside the factory that decides how the classes are instantiated. So this Design Pattern was certainly more of a challenge to wrap my head around but I think with this resource it’s helped me to understand it somewhat better. This pattern at least for me when working on it in the design pattern homework was definitely a little too convoluted for me to fully parse but it did still make some sense when I put it into practice. This video though has helped me to at least better understand the underlying logic of it all and really grasp the way it can work for other things and how you can even have multiple factories to produce objects in other ways. This resource definitely gave me a better appreciation for what the factory pattern is capable of and the different ways it can used. Not to mention that it seems infinitely customizable in that it’s scalability is huge. For the future I think I can expect to be using this at least for large scale projects that will have many different objects that need to added or used. This also makes me want to see what other design patterns there are other than the ones we have explored in class. So I think next I’ll be looking into other patterns and seeing what ones interest me. Other options I’ve been considering are patterns like the Decorator pattern or the Observer pattern both which look pretty interesting and I can’t wait to try them out!
Here’s the video!
—————————————————————-
From the blog CS@Worcester – aRomeoDev by aromeo4f978d012d4 and used with permission of the author. All other rights reserved by the author.