From the bunch of SOLID , I guess this is a fairly easy principle to understand. One of the basics of OOP is that we must code to interfaces and not to classes. Assuming that you have done that just make sure that your interfaces are not getting FAT. FAT is a common word used to explain this principle. By FAT we mean an interface with loads of methods in it and eventually all of them are not required by the classes that implement these interfaces.One direct issue with FAT…Continue
Posted by Rohit Pant on May 31, 2012 at 1:00am
Barbara Jane Liskov was the first women american computer scientst who earned a PHd in computer science. She is the one who also came up with Liskov substituion principle and it is the 'L' in SOLID. She coined this term in 1987. First let's see what it means in her own words. "If for each object o1 of type S there is an object o2 of type T such that for all programs P defined in terms…Continue
Posted by Rohit Pant on February 19, 2012 at 12:00am
Posted by Rohit Pant on December 3, 2011 at 2:00am
Time for Singleton.
“Ensure a class only has one instance, and provide a global point of access to it”
Why Singleton ?
Well, why not ? This is a very common pattern and as it's intent suggests it is all about making only one instance per class. There might be a strong…Continue
Posted by Rohit Pant on September 1, 2011 at 12:30am