Using Liferay as the development framework for web applications

05.07.2012.

From the very beginning, OptimIT was oriented towards web applications based on JEE technology stack, so we have accumulated considerable knowledge about designing, developing and operating web based business solutions.

Web applications built on JEE stack are no longer „new technology“. Although it is continuously improved, many frameworks and packages have been around for years. Struts, Velocity, Spring, Hibernate and others have been here for a long time. Web services, SOA, SOAP, XML-RPC and REST have been around for years also.

Common web application elements

A common theme that most business oriented web applications need to have features available to the system or the application administrators:

  • Menu (that can be easily extended and customized)
  • Support for changeable theme
  • Capability to easily add documents to the application (such as help files, instructions, templates)
  • Capability to modify the integrated content (latest news)
  • Provide a flexible authentication mechanism to allow single sign on with the enterprise identity and authentication providers (such as LDAP, Active Directory, and the similar)
  • Provide a flexible authorization mechanism by supporting groups, roles and permissions
  • Allow a hot-deployment of new versions of the software components without a need to restart the whole system
  • Allow various social integration functions, such as capabilities to add polls, support forms, comments, discussions side-by-side with core application functions
  • Provide back office/administration panels to manage users, groups, permissions
  • Support easy additions of ready to print reports
  • Provide workflows, notifications, user audit capabilities
  • Capabilities to provide runtime configuration changes, without requiring application restarts.

Soft application requirements

Most of these “soft” requirements are rarely mentioned in functional specifications, since they typically focus on the core application (functional) requirements. The other aspects are either ignored, and it happened to us more than once, that so called back office or administration capabilities often require as much time as core application functions.
For sure, over the years, there have been considerable amount of add-ons, libraries, widgets, frameworks that address some of the “soft” or “nice-to-have” requirements listed above. But since it is so common, one must wonder, why there is no single framework that could provide all of this “out-of-the-box”? Frameworks like JSF, Spring or Struts concentrate more on low level components (such as form elements) and processing workflow (usually built around MVC design pattern).

Once it got me thinking about that, the answer became obvious. There are such frameworks, it is just not immediately clear that they are called web portals. Wikipedia defines a web portal as a web site that brings together information from diverse sources in a unified way. Portal pages are composed of portlets that get dedicated area of a page showing a separate information sources. In our case, we narrow this definition to general purpose portals built on JEE technology stack, and implementing JSR-168/JSR-286 standards for the integration of portlets. Besides Liferay, other well known portals from this category include Apache Jetspeed, IBM WebSphere Portal, Oracle Weblogic Portal ,etc.

Configuration advantages

Configurable nature of JEE web portals enables users and administrators to utilize the following features:

  • Users (and especially power users and portal administrators) can influence the display (organization of portlets on a page, set of pages, menu contents, visual theme)
  • Application experience can be enhanced with various social or informational resources (general articles, FAQs, discussions, news feeds, document library, polls, online help)
  • User authentication and authorization is handled by a standardized module (often synchronized with organization wide identity management system)
  • Portlets can be reused and mixed on the same page (providing Enterprise Application Integration support).

Note that these advantages map almost directly to the desired business application features that have been listed above. That means that a business application, if developed to use portlet framework, can be broken down into a set of portlets. That set is then integrated into web portal pages in a way which provides desired features with no significant cost.

Development advantages

We found out the following advantages of adopting portlet oriented development of business applications:

  • Almost any JEE web application can also be developed as one or more portlets
  • Switching from web application development to portlet development requires little or even no training at all for experienced JEE developers
  • Existing component or workflow based frameworks (such as JSF or struts) can be used for controlling or rendering portlets, thus saving existing knowledge of web developers
  • Significant time savings in the prototype/mockup phase (since menus, themes, content can be modified much faster than for web applications)
  • Built-in web content management can be handed over to the customer staff even during the prototype phase of the project (which creates win-win situation for both sides)
  • Language localization of the content can be handed over to the customer or external (non-technical) staff for menus, header, footer and linked web content (web articles). Only translations of the form elements, labels and messages generated by the portlets need to be supported by the developers.
  • Simple additions of new groups and roles. High level permissions (such as access to certain pages or portlets) require no developer effort to support.
  • Possibility of integration of 3rd party portlets for specific business functions (such as polls, reports, etc.) with no developer effort required.

Disadvantages

  • Increased resources (primarily memory) needed on development, test and production instances
  • Slower round trip (write/deploy/test) development cycle when changes require portal restarts
  • Stricter requirements on CSS classes and styles
  • More complex initial software installation and deployment (because it requires installation and configuration of the portal itself)
  • Lower level frameworks might require portlet bridges to function properly.

In our experience, the benefits of adopting web portals based on JEE platform are greater than the disadvantages by a far margin. Therefore, web portals such as Liferay have become a preferred choice as the web application development framework in our case.