Expression Blend Beta 2 out

Posted on January 31st, 2007 in WPF by Puneet Sarda
The Expression team announced the availability of Blend Beta 2. Download it now!!
Update: Expression Design Beta 1 is also out.

Vista Launched

Posted on January 30th, 2007 in Vista by Puneet Sarda

Find it at Window’s MarketPlace.

Watch Bill Gates host the Worldwide Launch. Also check out the new Microsoft homepage.

Microsoft IPOD

Posted on January 30th, 2007 in Uncategorized by Puneet Sarda

There is a lot of discussion about Zune and IPOD. On Youtube I found this interesting video by someone who shows that if Microsoft made IPOD, how would the packaging look like. Remember, Apple is known not just for the IPOD but also for the lovely packaging it comes in.

One day to go

Posted on January 29th, 2007 in Vista by Puneet Sarda

Vista launches Jan 30th. And there is so much buzz happening around it.

  • T-mobile is giving free wirelss internet to Vista users for the next 3 months. Sign up here
  • Best Buy has some cool Vista videos to help customers know whats in store for them.
  • For the puzzle solvers, AMD and Microsoft have come up the VanishingPoint Game. Sign up to solve puzzles and look for solutions on this wiki.
  • The Windows Vista Team has extended invitation to community members to celebrate Vista’s launch
  • The Launch 2007 Tour.

The “WOW” starts tomorrow!! :)

Classes and Interfaces

Posted on January 27th, 2007 in OO Concepts by Puneet Sarda

When coming up with application architecture, it’s common to run into situations where you have to decide if to use a class or create an interface. Abstract classes with all virtual methods appear to look just like an interface with a bunch of methods in it. However when designing classes and hierarchies of classes we also need to make sure that types of a particular kind are implemented such that the relation between them is evident.

Abstract classes and derived classes indicate the IS-A relationship. Any of the objects of the derived classes have come common characteristics which make them similar to each other. A honda civic and a toyota camry “is a” kind of car. I could make an abstract car class and derive the civic and camry class from it hence making them cars inherently. Or I could create an interface which would have methods and properties defining the characteristics of a car and then have civic and camry implement that interface. From a functionality perspective, either way, the civic and camry classes do the same functions. But if you look at the design of classes, it is counterintuitive when you use interface in this scenario. And that is the most important part of designing class hierarchies or for that matter type hierarchies. The design has to be intuitive to another developer who reads your code. Interfaces indicate a “CAN-DO” relationship indicating that any calss who implements it, in addition to its inherent functions and logic, can also do this particular action.

When  building an application, being concerned about such design issues helps you in maintaining the application as years go by and new modules get added. However the scenario is very different if you design an applicaiton framework to be used by other developers for making their programs. Then decisions about whether something should be an abstract class or an interface can have a huge impact.

As Brad Abrams points out in Framework Design Guidelines “The main drawback of interfaces is that they are much less flexible than classes when it comes to allowing for evolution of APIs”. The idea being if you ship an interface and later want to add other methods/properties to it, you can’t as that is a breaking change. Everyonre who is using your interface in its v1 when they get the v2, the compiler will complain that the interface is not implemented completely. There might be a few ways to get around the issue but none of them are elegant or intuitive.

I will close with the recommendation from Jeffrey Richter in the same book

“Define an interface first and then define an abstract base class that implements the interface. Use the interface to communicate to the object and let end-user developers decide for themselves whether they can just define their own type based on your abstract base class(for convenience) or define their own type based on whatever base class they desire and implement the interface(for flexibility). A good example of this is the IComponent interface and the Component base class that implements IComponent.”

Again…most importantly use your judgement as these and many other rules are just rules of thumb. For your application or framework decide whats the most appropriate option. For reference Section 4.3 in Framework Design Guidelines explores the interface/class issue in good detail.

The Tipping Point

Posted on January 25th, 2007 in Books by Puneet Sarda

The Tipping Point

Read this wonderful book last week. Malcolm Gladwell explains, with great insight and convincing evidence, how ideas propagate and behave like “epidemics”. The author has a summary page about the book that gives you a good idea what it is all about. Additionally there are some excerpts from the book.

On a side note, check out his blog to find an interesting take on the Enron Controversy.

Got a personal domain

Posted on January 24th, 2007 in Uncategorized by Puneet Sarda

Happy to have a website of my own :)

Got the Lunarpages basic plan. Going forward will be posting on this site only. Added a lot of links from my google reader list onto the right sidebar.

I like wordpress. It is way more powerful than blogger where I had my earlier blogs. Have installed a few plugins for wordpress and some don’t seem to work. Will spend some more time on it otherwise m good with how this looks right now :)