Juri Strumpflohner
Juri Strumpflohner Juri is a full stack developer and tech lead with a special passion for the web and frontend development. He creates online videos for Egghead.io, writes articles on his blog and for tech magazines, speaks at conferences and holds training workshops. Juri is also a recognized Google Developer Expert in Web Technologies

Google AJAX APIs: The Google Visualization API

2 min read

From now and then I'm always taking a quick look at Google's API page to see whether something new and interesting is there. Today I got stuck at the Google Visualization API, an API that may be especially be interesting for developers involved in web technologies.
As the name already suggests, the API is all about visualizing data (to the users) and so to enhance your website, company dashboard or web application. The API is really simple and well structured. The best to start is to go to the interactive sample site. There you can see existing examples, run and modify them. It's really cool because so you don't have to do any specific setup for trying the API. And I notice that if you drop the "?type=visualization" at the end of the URL you can even try out more of Google's Ajax APIs: * click *.

I think this API could be quite useful in certain areas. Recently at work for instance, I had to write a custom extension for the Microsoft Ajax Control Toolkit. It was basically an improved version of the already existing "Modal Popup". We have used the Modal Popup control as a sort of lookup where the user could choose some value to be selected, also with the possibility to search for a specific one. The modal popup was inside an UpdatePanel to make it work "asynchronously". The problem however was performance (due to the page viewstate and the postbacks) and so I created a new extension where the data was fetched asynchronously (without relying on the MS UpdatePanel) by using JSON to exchange the data between the client and server. The performance improvement was impressing, from about 30 to 50 seconds on a slow modem connection to about 4 seconds, and even instantaneous reaction times on a normal DSL connection. At that time I constructed the HTML for the tabular representation of the data (to be displayed on the popup) on the server side. This allows for more flexibility, it was however not my preferred way. Now having this API (take a look at the basic table module), one can create tables on the client side very easily out of transmitted JSON objects. And there is already a lot of build-in functionality such as column sorting.
Questions? Thoughts? Hit me up on Twitter
comments powered by Disqus