Finishing Up JiGV – Java Interface to Google Visualizations
Today I was able to finish up the first complete cut of my work on the Java classes for the Google Visualization API. For the last two days I've been hammering out a class structure that allows me to easily create tables of data that are then easily serialized to the Google widgets. This is a core component of the project I've been working on here since my arrival. With the incredible elegance of the Google Visualization widgets, it was a natural fit to make the data we have fit the API, and then be able to easily change the widgets on the front-end.
One of the nice things I added was a DatabaseTable that sub-classed the basic DataTable and created a constructor that takes a simple JDBC ResultSet and from that builds the DataTable for easy serialization. This will make it easy for me to make a servlet that will use the Google API to receive a GET message with a SQL statement in it, run that query, build a DatabaseTable from the results, and then serialize the data back out. Efficient and elegant. Nice.
Additionally, I wanted to complete the Google API with it's CSV and HTML output formats. These were pretty easy given that I'd already done the JSON version, but it's going to make it nice for debugging the code and checking on the data. They didn't take long, but it was worth the effort.
So it's looking like it's time to move into the Tomcat codebase. I need to put in the H2 in-memory database and then back-end it with MS SQL Server, and then put the servlets on the front end that I built this code for. Making progress. Lots and lots of progress.