Busy with relocation, just got my internet connection working :).
One interesting topic I always wanted to read on the net was about which design patterns are the most famous and I wanted to avoid discussions and articles that have “depends on situation”. I just cant accept that answer, depends.. :). So here is my take on last 6 years of its use.
Strategy pattern is the most used. Yeah! Yeah! you will argue on the MVC, but come on have you actually implemented the MVC, no you haven’t in true sense. What you have implemented is the MV model, not the C. You may have used the MVC implemented by frameworks right? So don’t give me that argument. And yes, don’t even start about the Singleton, if you have used it, you will know the lesser you have and lesser you need pattern in a product. I mean how many singleton’s can you or will you or should you have in an application right ?
Strategy for me is fantastic use of future growth, re-usability and abstraction. The question that I had was, is it better to use an interface or an abstract class when implementing the Strategy pattern? The answer is simple, if you have future growth needs for your customizable design, you will most definitely have come common behaviour for each of those who are sharing the signature, so use of interface is lame. I would always use an abstract class. Now lets see you debate that.. 🙂 Comments please.