effectiveUI blog

Interpreting today’s digital landscape and how it is transforming the human experience.

Liferay’s Role in the Water For People Online Reporting Platform

by Steve Clement
April 17, 2013

EffectiveUI has recently completed development on the new Water For People Re-Imagine Reporting application. This online reporting platform offers a new way for philanthropic organizations to manage data and prove their efficacy to stakeholders. As the technical lead on this project, I’d like to share some of my experiences, in particular how the Liferay portal platform contributed to the project’s success.

We chose Liferay, the leading open source portal platform, for several reasons. At a high level, we needed to have some content management and publication as well as the ability to create a custom application that could parse spreadsheets, store the data in a database, and retrieve the data for display. In other words, we needed both a Content Management System (CMS) and an enterprise application.

Liferay’s portal architecture allowed us to compose our pages as individual portlets, some of which could be CMS while others could be custom-built to handle the data requirements. For those not familiar with portlets, these are basically individual Java web applications that can be placed on a page and are managed by the portal server. Similar to traditional Java servlets, portlets work with a request/response model, but they also have additional lifecycle management issues due to the fact that multiple portlets can exist on a single web page.

Portlet View

Liferay provides a number of out-of-the-box portlets for CMS display and publication. In addition, Liferay also provides a number of ways to extend or customize these portlets without having to actually modify the Liferay source code itself. For example, we took advantage of this feature in order to provide automatic Spanish translations when saving certain pieces of web content.

The meat of the development effort, however, came from the data-driven reporting that Water For People required on their new platform. Various types of data, from water and sanitation metrics to financial information, had to be parsed from Excel spreadsheets and retrieved for display in the data portlet. This led us to Liferay’s Document Management System (DMS), which provides a way to version the data files used to populate the database.

Service Builder (Source: javabeat.net)Liferay provides a slick feature called Service Builder that assists developers with database interaction. From an XML file defining the database entities, Liferay creates the code for the database table creation and indexes, as well as creating the Java model objects and utility service classes for managing the database interactions. All of the ORM (Object Relational Model) code and CRUD (i.e., create, read, update, delete) functionality is set up by Liferay—nice!

Service Builder is a bit strange to work with at first. Normally, interfaces are designed first and the implementing classes are then created afterward to fulfill the contract defined by the interface. In the Service Builder model, however, the custom methods needed on the utility service classes and model objects are first added to *impl classes. Re-running the Service Builder “Ant” task handles the code generation to add the new methods to the interfaces backing these classes.

Liferay also provides user management with a rich set of permissions that can be aggregated into roles that are then assigned to users or user groups. For the Water For People project, we used this feature to create limited-access roles for content authorship and limited administration tasks.

Liferay proved to be a good choice for the Water For People RIR platform. Because the platform provides many out-of-box pieces of functionality, our development effort could focus on those aspects of the project that were truly unique to the project while adapting those pieces that, while important to the project as a whole, were not unique to this project (e.g., CMS, DMS, user management, etc.). This ultimately benefitted our client and provided them a much richer application than we might otherwise have been able to realize within the same budget.

To learn more about the Water For People Re-Imagine Reporting platform, see this recent press release.

Leave a Reply

Captcha Captcha Reload