Thursday, 5 November 2009

XStream : The Simplest XML serializer

Serializing XML to (Java) objects and back just became simpler with what is being touted as the fastest and the simplest XML serializer, XStream.

According to this bench marking excercise, XStream is the fastest Serializer to hit our Java objects. While marshalling and unmarshalling is a time consuming task, using XStream would definitely be a performance boost. But while speed and its low memory foot print are talking points, it is simply easy to use. The XStream two minute tutorial takes TWO MINUTES to read and digest. The only slightly disconcerting aspect is that releases are few and far apart.

One a final note, if you are looking for an XML serializer that serialises with no hang ups, XStream might fit the bill but be aware that using XStream is like traveling in the economy class of a budget airline and while you might get home, you cannot expect too many features. For features, pick up JaxB 2.1 or XMLBeans.

Tuesday, 20 October 2009

One JAR for all your JARs

Sometimes it is more convenient to package your Java application into a single JAR which includes all dependencies and works just like an executable. This seemingly simple objective becomes complicated when the dependencies include otherJAR files as one can run into JAR Hell with the Java Class Loader. One possibility of achieving the goal of having a single executable jar is using One Jar.

Tuesday, 6 October 2009

Scalable Vector Graphics

Scalable Vector Graphics provide a rich source of functionality that allow applications to manipulate and respond to the user interactions with the image. Creating and modifying SVG images is possible using one of the several open source tools available.

Batik SVG Toolkit is an impressive Java based open source SVG toolkit that provides libraries for the dynamic manipulation of SVG objects from within a Java application. While Batik provides a rich array of functionality, it somewhat lacks a good WYSIWYG editor.

A good WYSIWYG editor for SVG Graphics is provided by Inkscape which is another open source SVG editor with several advanced editing features such as (markers, clones, alpha blending, etc.)

Monday, 6 July 2009

Wimbledon 2009: Federer won but Roddick didn't lose

Last night, Federer created history by overtaking Sampras as the all time winner of 15 Grand Slam titles. In doing so, he set another record by appearing in his seventh consecutive Wimbledon final but spare a thought for the man who stood in his way and threatened to spoil the party, Andy Roddick.
Roddick came to this final a record of 18 loses and only 2 wins against Federer. This was hardly encouraging however, armed with a new strategy that attempted to stifle the free flowing Federer and a fitter body, Roddick unleased a barrage of serves that kept him toe to toe with the FedEx. Infact throughout the match, it was Roddick who on several occasions threatened to seize control and run away with the match, however Federer being the great Champion that he is used all his experience to finally overcome Roddick in the longest fifth set in the annals of the competition. Well Done Federer (for the win and for also regaining the number one ranking) but also Well played Roddick!!