Thursday, 3 July 2008

Ouch! Ouch! Ouch!

Due to my usual forgetful nature, I forgot to pack my shaver again. Fortunately, I always have a spare Gillette Sensor Excel(TM) cartridge with me whenever I travel. So I shaved by holding up the tiny blade with my both hands...soon blood started dripping.

[Rewind to 10 hours ago]

On the flight to Mumbai, I was reading the Visual Studio Magazine, June 2008 issue. In it, there is an article on object validation, called Make Your Types Report Their State. It gives a good introduction of what object validation is all about and how to do it in VS.NET 2008.

[Fast Forward to this morning]

As I woke up early due to jet lag, I browsed the web (thanks to wifi broadband everywhere in Indian hotels). I came across an announcement about a Java object validation framework - iScreen 2.0.0, freshly out of the oven on June 28, 2008.

As in the VS Magazine article showed, in VS.NET 2008, a developer would have to sprinkle the Debug.Assert() statements everywhere in the code to achieve object validation. But in Java world, a dedicated framework has been created for free. iScreen factors the validation rules out of the core code into configuration files, making it easier to add and change those rules later. It also comes with a collection of pre-packaged validators, and plays well with other Java frameworks.

As an old Chinese adage says: if you want to achieve good results, you must sharpen your tools/weapons first (or something like that). Java has always been big on supporting and tooling frameworks. In some cases, too many. It looks like Microsoft again has some catching up to do.

My trusted Gillette Sensor Excel(TM) has done a decent job although without the support of a proper handle. Lucky for me, there is enough time between now and my next business meeting to allow the bleeding to stop.

No comments: