Folks,
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…
ContinueAdded by Rohit Pant on May 31, 2012 at 1:00am — No Comments
Folks,
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…
ContinueAdded by Rohit Pant on February 19, 2012 at 12:00am — No Comments
Open Close Principle
'O' in SOLID is Open Close Principle. Termed a long time back and of course is very effective today also. It was coined somewhere 1988 by Bertrand Meyer in his …
ContinueAdded by Rohit Pant on February 11, 2012 at 6:30am — No Comments
Added by Rohit Pant on December 3, 2011 at 2:00am — No Comments
Friends,
Time for Singleton.
GoF Intent
“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…
ContinueAdded by Rohit Pant on September 1, 2011 at 12:30am — No Comments
Hello !
Time for another pattern. Abstract Factory (AF). Let's start with the GoF intent.
Intent :
"Provide an interface for creating families of related or dependent objects without specifying their concrete classes"
Deep Dive
There are many ways of arriving at this pattern when it…
ContinueAdded by Rohit Pant on August 14, 2011 at 10:00pm — No Comments
Friends,
it's time for Decorator pattern today. It's an easy pattern and as the name suggests it surely decorates core objects as per the business requirements. Let's start.
GoF Intent
“Attach additional responsibilities to an object dynamically. Decorators provide a flexible alternative to sub classing for extending…
ContinueAdded by Rohit Pant on July 31, 2011 at 1:30pm — No Comments
Folks,
It's time for Composite pattern.
GoF Intent
“Compose objects into tree structures to represent partwhole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly” .
This is definitely a better definition than Bridge, isn't it ? Gives a clear hint that there might be times when we need a tree structure to come to our rescue…
ContinueAdded by Rohit Pant on July 9, 2011 at 6:30am — No Comments
Friends,
GoF Intent “Decouple an abstraction from its implementation so that the two can vary independently”. This is one definition which is magical. If I see the words used for constructing the definition, I feel that I know these words. Words like Decouple, Abstraction, Implementation we all come along with them all the time. But if I read the sentence I don't understand it. How is that possible, it's pure magic. Let us try to understand this pure…
ContinueAdded by Rohit Pant on July 2, 2011 at 11:30pm — No Comments
Friends,
GoF define Façades intent as “Provide a unified interface to a set of interfaces in a subsystem. Façade defines a higherlevel interface that makes the subsystem easier to use”.
A good way to remember Façade is to imagine a sub system that is badly designed or complex or legacy system. In all the cases there might be a need to reuse the system because of some reason or the other. You know sometimes we do get to work in a project which needs to interact…
ContinueAdded by Rohit Pant on June 11, 2011 at 10:30pm — No Comments
Introduction
There is no real reason to pick these three patterns for the first blog on series of pattern related blogs. It's just that we had to make a start, somewhere ! But these three patterns are very interesting and to some extent very similar. Consider a diagram below
Client → Adapter → Original Class
Client → Façade → Original…
ContinueAdded by Rohit Pant on June 10, 2011 at 3:00am — No Comments
Dear Friends,
There is a possibility of making one of the systems that we developed for one of the client to be available to more than one of his clients :) The requirement is straight forward - one installation should be accessible to multiple organizations/set of people or whatever. I think it's a common scenario these days but something I had actually not done in past. At i2 (where I used to work earlier) there was no such concept at least in the product lines…
ContinueAdded by Rohit Pant on May 10, 2011 at 4:00am — No Comments
Friends,
I recently hosted a podcast on AWS on Bangalore Software Radio. You can get it here. But this podcast got me thinking about many other things that I see changing around me and how they clearly depend on each other. For instance – top class hardware is now a commodity. What about software ? Some time back hardware was expensive. So after spending million of dollars on hardware one would not mind spending a…
ContinueAdded by Rohit Pant on April 11, 2011 at 1:06am — No Comments
Dear All,
Very recently I started Bangalore Software Radio and did our first recording. It was a tech news podcast and we could talk a bit about Twitter, HTTPS, Security, Google and Duck Duck Go !
In future we are planning to do more newscasts and more detail technical podcasts so watch this space !
cheers…
ContinueAdded by Rohit Pant on March 29, 2011 at 9:00am — No Comments
Added by Rohit Pant on March 7, 2011 at 3:00am — No Comments
Added by Rohit Pant on February 14, 2011 at 11:30pm — No Comments
Dear All:
Some of the engineers are just too crazy about cricket. Earlier at Stragure they had made India Vs SA android app over the weekend. Before I knew in last two days, they made one more small app for world cup. Today I saw them recording a video about the same and lo before I could blink they uploaded it on youtube.
By the way Ind Vs SA series android app did well in it's…
ContinueAdded by Rohit Pant on February 14, 2011 at 10:00pm — No Comments
Added by Rohit Pant on February 6, 2011 at 7:30am — No Comments
Hey !
Around 2 weeks back when we decided to write some server side code which would finally come down to mobile (android to start with), we did not know what to expect. We forgot to put Google analytics and therefore, could not do deep slice and dice on hits. Finally reading server logs was not too much fun and we decided to put Google analytics in place and got some…
ContinueAdded by Rohit Pant on January 21, 2011 at 3:53am — No Comments
Hey - guess what , yesterday Friday afternoon a bunch of us sat together and thought 'let's do something for getting the live cricket scores on mobiles'.
So this is what we did -
1) We wrote a small server side Java code which runs inside a servlet container to handle the load, hopefully :)
2) We wrote a small android code which runs on the device
3) We don't want the stuff to go down under load , so we load balanced it and for the time being…
ContinueAdded by Rohit Pant on January 8, 2011 at 10:01am — No Comments
© 2013 Created by Rohit Pant.