Sep 27 2008
Upgraded my blog
Finally I have upgraded by blog to WordPress 2.6.2. You can download it here.

Sep 27 2008
Finally I have upgraded by blog to WordPress 2.6.2. You can download it here.

Sep 27 2008
In simple terms, polymorphism is the ability of one type, A, to appear as and be used like another type, B. In strongly typed languages, this usually means that type A somehow derives from type B, or type A implements an interface that represents type B. In non-strongly typed languages (dynamically typed languages) types are implicitly polymorphic to the extent they have similar features (fields, methods, operators). In fact, this is one of the principal benefits of dynamic typing. - Wikipedia
Polymorphism is tightly coupled to the inheritance and is often considered to be one of the most powerful feature of the object oriented programming. It can be defined as a term according to which a name (variable declaration) may denote objects of many different classes that are related by some common suprclass; thus, any object denoted by this name is able to respond to some common set of operations in different ways. - Grady Booch
Lets consider an example:
There are two array of shapes called Rectangle and Circle. Even though we treat both these as a Shape but their implementation is quite different. In nutshell, each class is able to respond differently to the same method getArea(). This is called Polymorphism.
UML Diagram

PHP Code


Sep 26 2008
This is my first attempt to try to understand and implement patterns and practices. It is necessary to understand and implement these design patterns in order to make code flexible, re-usable, highly cohesive and less coupled.
In software engineering, a design pattern is a general reusable solution to a commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations. Object-oriented design patterns typically show relationships and interactions between classes or objects, without specifying the final application classes or objects that are involved. Algorithms are not thought of as design patterns, since they solve computational problems rather than design problems. - Wikipedia
http://en.wikipedia.org/wiki/Design_pattern_(computer_science)
As this is my first post regarding patterns and practices, I want to express something that I have learnt about Factory Method Pattern. It is a part of Gang-of-Four (GoF) design patterns.
The Factory Method pattern is a way of creating objects, but letting subclasses decide exactly which class to instantiate. Various subclasses might implement the interface; the Factory Method instantiates the appropriate subclass based on information supplied by the client or extracted from the current state. This pattern enables to make decision about which concrete class to be instantiatedin the run-time.
Lets go thru an example:
There is an interface called IPerson and two implemented class named Student and Programmer. The class called PersonFactory is created to make run-time decision about the selection of Student or Programmer thru a static method named GetWorkDone.
UML Diagram

PHP Code


Sep 03 2008


Today the search giant Google released its own browser based on WebKit framework. WebKit is also used by Apple for its Safari browser. The release of Chrome is significant in the sense that yet another browser is added in the already crowded browser market. But its not any another company, its Google. So. I am
expecting some radical shift of trend in this new browser war. The unique features of the Chrome as mentioned by Google are:
In this networked information economy, the web is the primary source of information in the form of social networks, blogs, micro-blogs, bookmarking sites, and so on and the browser is the gateway to access those information. Microsoft’s IE still holds more than 70% of the browser market while Firefox has about 20% market share a, Safari with 6% and remaining for other browsers. The success of Firefox has already proved that the consumer can tend to shift from one browser to another if one offers peculiar performance and features. Firefox is also one of the most successful open source and community driven project most of which is funded by Google. The alliance between Google and Mozilla Corporation has proved to be quite successful in grabbing the market share from IE. In my opinion, the success of Firefox within the short time frame has been possible not only from the contribution of the Google and other major Corporations but also from the bunch of enthusiast community. One can find whole lots of add-ons and plugins for Firefox that could make and indeed is making the life in the web quite easier and interesting.
I am calling this the initiation of the new browser war because Google has the tendency to make the impossible possible. As more and more people are using the web as the base of their daily activities Google does need a browser to compete directly with its arch rival Microsoft. With IE still holding one third of the browser market the introduction of Chrome by Google definitely has draw a new line in the already tensed rivalry between Google and Microsoft. Microsoft’s Live search is the default search in the IE. Though Google has the partnership to with various vendors like Dell to make its search as the default one, it may not be enough for them as Microsoft is doing everything it can to challenge Google search dominance.
Basically, if we go through the history, the browser war can be divided into the mid and late 90’s battle between Microsoft and Netscape and the splendid rise of Firefox within 3 years or so. Microsoft won the first browser was with Netscape because Microsoft gave IE free of charge and Microsoft had robust complementary products to compete against Netscape. In the second browser
war that is still continuing, Firefox gained significant share of Microsoft because Microsoft virtually stopped developing any new features for IE from 2001 to 2005 and they also did fail to live up to the expectation of the consumer. With the release of IE 7 and Firefox 2, the battle did intensify. Now with the entry of Google in the browser market we can expect some cool innovation and
neck-to-neck competition among all major browser vendors. Google will certainly wants to make Chrome the de facto gateway for users to perform any web related activities bypassing dependency on Microsoft’s IE.
It is sure that the browser will be everything in the future with people needing only OS to run it. Every computer related activities will be performed in the web with the advancement in the web technologies and the speed of the Internet. So, with the entry of Google and the initiation of new browser war the ultimate winner will be us i.e. the users.
