Toggle Menu [-]

VelocityReport plugin history

Published by admin on Monday, April 26, 2010 - 06:53:51 - Filed under General, News, Announcements, Development

Jeff Bader contacted me a few months ago because he wanted to Open Source his nice XhtmlRenderer plugin. Basically he couldn’t find the time to support it anymore and he thought that it was kind of competing with the BrowserSuite, so he asked me if I would be interesting in porting it to Servoy 5 and see what could be made out of it.

At the time, I didn’t really know what to do, I knew about the plugin but had never tested it, and I had no real idea how to make it relevant after all the effort I already put into the Browser Suite.

Then, a few weeks later, my boss came to my office with one of her crazy ‘on-the-fly’ requirements for a future project… The project was not that difficult (it involved some kind of management tool to create surveys and to gather results in Servoy), but there was one part that was a bit frightening in it: she showed me the kind of reports she wanted to output from the data gathered. It was 8 to 10 pages long, with each pages having a different structure, one with a simple text, with paragraphs and styles, the second with a table of 8 column and another table of 4 columns (with one big column of text and little results column and background colors to show a kind of graph of the values), the next one with some charts and explanations underneath, etc.

All along I thought: god, it’s going to be a nightmare to create this kind of report dynamically with Servoy and Jasper Reports.

And then I remembered that the last time I had a seemingly impossible report to create in Jasper, I actually did it in HTML in no time! It was for a calendar tool that I have made (in Java, web-based, not in Servoy), with a monthly view of 7 columns x weeks and different ‘events’ with background colors and a certain number of lines of text inside each cell.

I did it in HTML and used the xhtmlrenderer library (aka the Flying Saucer project). What was nice about it was the CSS capabilities of that libary and the fact that it was dead easy to create PDF with CSS styling.

So remembering my usage of the xhtmlrenderer lib to output a report, and knowing that there was this plugin waiting for me to put my nose into it, putting all this together, I saw the light! (It happens to me too, sometimes :)

I talked to Jeff about it and he was enthusiastic about the idea, so we had extended brainstorming sessions using Google Wave (quite handy for that) and after a few weeks of hard work the result is what we decided to call the VelocityReport plugin.

Why the name? Well, first it’s a plugin. And second, we added the Velocity templating engine to ease the integration of ANY kind of Servoy source inside a XHTML template. And third, it’s a reporting tool!
In the end, we also integrated the Eastwood library (based on JFreeCharts) as a more powerful alternative to Google charts because a proper reporting engine really need this too, and Barcodes (using barcode4J) to round this up.

So this is yet another Swiss knife for Servoy that you got here (as I heard David Workman call the BrowserSuite, although it would be more apt to call it a French-Canadian knife ;). But it is not competing with the BrowserSuite because the primary goal of this one is reporting and PDF output, NOT dynamic HTML manipulation.

Still, I guess there is a lot of things that you can do with it: let alone reporting, you can use it for creating charts or barcodes, and you can use it to ease the production of html (no more laborious concatenation of html and variables, use templates instead!).

The charting integration was a good challenge, especially the fact that we wanted it to feel simple and natural to Servoy developers, creating charts using Servoy methods and Javascript objects, not even noticing that Java is actually doing all the work for you… In the end, I think we have found a good balance between extended options and low complexity, once you get the hang of it, it should be quite easy to get what you want, all of this inside Servoy without any need for Java coding of external beans.

Right now we expect to gather some feedback from seasoned Servoy developers before releasing a public preview, but it shouldn’t be long before you too will be able to build reports in Servoy ‘the easy way’

Check this out soon on a web site near you!