Factory design pattern and interfaces

Wednesday, 25 July 2007 23:22 GMT

A CLASS is often described as a blueprint for objects that are created from it. It specifies the behaviour of its instances and the data they contain (as methods and member variables, respectively).

In a similar way, an interface can be described as a set of requirements for classes. It can be regarded as a contract that specifies what methods should be present in the classes derived from it.

Taking manufacturing as an analogy, the interface represents the product specifications, and the class, the manufacturing specifications; the interface states what the product should look like, and the class describes what goes in the product.

Because the interface is such an abstract concept, many beginners in OOP fail to recognise how useful it can be for improving the design and robustness of their applications.

Here, I will try to demonstrate how the power of interfaces can be harnessed to add flexibility to an application.

Continue reading Factory design pattern and interfaces

Popularity: 62% [?]

My book collection on LibraryThing

Tuesday, 10 July 2007 18:26 GMT

20070710-001

TAKING a cue from Avinash, I have started cataloguing my book collection on LibraryThing. I had many more books than what are there, but over the years many have been given to friends, relatives, and charities. For example, of the Bourne series, I have only one left, and all my Tom Clancy novels have new owners.

I did not put the books on LibraryThing to show off or to manage them, but rather to take advantage of the automated recommendations based on the titles that others share with me. Avinash is already on my contacts list; if you are on LibraryThing, please let me know, and I will add you as well.

Eddy.

Popularity: 26% [?]



Powered by WordPress and Eddy Young.

DISCLAIMER: This site is supported by advertising. As a result, cookies may be installed by advertisers in order to track usage and trends. If you do not want this, please disable cookies for this site.


You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser