Java EE Reporting – I was thinking about it

357 0
Java EE Reporting – I was thinking about it

When it comes to deliver reports to the end user, the number one approach for the Java enterprise developers nowadays is jasperReports. Why they do so? What does it offer that makes then all gather around it? Well, it generates HTML pages, pdf files, xls, csv and the list goes on. It also supports different data source types. Most importantly (for the designers) it provides a template based report generation approach. They also offer a design studio, so you got all you need to get reporting.

Okay, it sounds like I’m committed to convince you to use jasperReports ( I bet you are already), but not really. I was describing the tool and why most of Java developers justify their faith to the tool. Well, does it even have competitors? None. They don’t have options do they?

Developers have been exposing themselves to such a complex tool for a tiny goal. Most of these professional never had to generate a csv or doc file.

All they wanted to do is to get a pdf file. What’s the point Mario? Well, the point is I’m talking about Java enterprise and in most of the cases users interact with the system from a web interface through web browsers. Such web browsers render html, css and execute JavaScript.

And? Thats it. If we are developing a web application, there is no way we wouldn’t understand of markup, style sheets and JavaScript. What if we could write our reports directly as web pages, take advantage of all the HTML5 and CSS3 resources and give to the user an option to get the report as pdf? He would already be displaying the report and he could decide to keep it or not by getting the pdf. We could even cache the markup somewhere without having to generate it always and improve user experience. It would be great wouldn’t it? This is exactly what I thought when I met the open source project wkhtmltopdf. This project aims to allow rendering of HTML on the server-side directly to a pdf format. It is based on WebKit. I have been testing it and the way it is now it can really help. If you are addicted to design tools then pic an HTML editor and have fun. You want charts, there are plenty JavaScript frameworks.

There is nothing to fear. After all, it’s just HTML. 🙂

(Visited 21 times, 1 visits today)

Mário Júnior

Mário Francisco Júnior is the Head Of Software Development at Vodacom Mozambique.