Skip to content.

OpenAdvantage - Freedom, Choice, Control

Sections
Home Articles Lenya review

Lenya review

This review follows on from my previous article, which outlined the criteria I applied to many of the main open source CMSs to determine their suitability for a developer. Lenya is unique among the systems reviewed, in that it is Java based, rather than being based on Zope or written in PHP. Although a relative newcomer to the field, it shows great promise, and is already a very capable system.

Homepage: http://lenya.apache.org/

Version evaluated: 1.2

License: Apache Software License

Platform: any Java server (e.g. Tomcat, JBoss)

Commercial support: used by several software companies as the foundation for their solutions, but no support companies in Europe are immediately obvious

Example sites:

Overview

Lenya is a relatively young project, but strengthened by the fact that is under the Apache umbrella. Apache projects are typically high quality and attract many good contributions; they also tend to be on the cutting edge, and incorporate features which don't make it into mainstream projects until much later. As such, Lenya is already a capable CMS, and shows a lot of promise.

Lenya is based around the Cocoon project, which is a set of libraries for building web applications with a special emphasis on XML pipelining. Cocoon applications can be designed to perform a custom sequence of transformations on a given XML resource (e.g. translate to HTML or PDF) before delivering it to a client. Lenya takes advantage of this framework and stores all content as XML, transforming it on the fly when required by clients. It then intelligently caches the results of the transformation so it can be reused if necessary.

Lenya would provide a good starting point for a company planning on building a Java-based CMS. While there are other alternatives (e.g. Nukes, Daisy), these are relatively inflexible by comparison, and would not provide such a good base for a custom system.

The system is also a good long-term prospect: it is currently under heavy development, and likely to make quick progress to become the number one Java CMS.

Default capabilities

Lenya is available in two separate packages:

  1. A standalone version. This uses the Jetty embedded Java server to run the application.
  2. As a Java web application. This can be installed into any Java servlet-enabled application server (e.g. Tomcat).

In both cases, a Java virtual machine (version 1.4.2 or greater) and Cocoon are required.

The installation instructions on the Lenya website are comprehensive but not for the faint-hearted. Both use Ant to build Lenya from source, so some understanding of this tool is probably essential.

Once you have it up and running, the application provides two main areas:

  • The live web site
  • An authoring environment/staging area

The interface is very detailed, providing a lot of options for each content element. For example, each content element has 8 tabs of configuration options, including metadata, versioning and workflow information. However, this would make the interface difficult to follow for a non-technical author. For example, I found the workflow rules very unintuitive, and had a struggle to even publish new content to the site.

Another issue would be working out how to clean out the examples provided with the default install. The content files themselves are spread over several directories, and it would be a fairly complex task working out which to remove.

Having said this, the system is generally stable and feels very capable and flexible.

These are some feature highlights included in a standard installation:

  • WYSIWYG editors for both XML (Bitflux) and HTML (Kupu), with validation engines behind them. A form-based editor is also available where full-blown WYSIWYG editing is not required or is inappropriate.
  • Very fine-grained access control, though relatively easy to follow. Separate permissions are available for editing and viewing.
  • Check-in/check-out of content.
  • Scheduling for content publication and archiving.
  • A new version of each content item is created whenever it is edited.
  • Navigation menus are editable through a simple interface. Breadcrumbs and tabs are available as navigation elements by default.
  • Integrated full-text search engine (Lucene).
  • Customisable workflow supporting authoring, staging and live areas. All workflow steps are logged for auditing purposes.
  • Site content can be managed through an "explorer" style view, including facilities for moving, renaming, deleting (with a trash bin) and archiving files and directories.
  • Assets such as images can be centrally managed and associated with pages. Pages can also be associated with each other.
  • Content can be exported as static HTML pages for use in a non-database-driven website.
  • Authentication via LDAP.

Additional modules

Because Lenya is a relatively young project, there are no "offshoots" from it as yet. All of the add-ons built for Lenya are part of the core product.

Template extensibility

One key feature of Lenya (and, more generally, Cocoon) is that all content is stored in XML files. In this respect, Lenya content is infinitely malleable, and could be templated to produce any kind of output. Cocoon itself supports generation of PDF natively, so it should be fairly simple to generate PDF files from site content on the fly. Another advantage of this approach is that all content is human and machine readable, so there is no possibility of being tied to a closed binary format: Lenya data should be free data forever.

Lenya also allows you to define document types. Each type acts like a database table, in that you can specify a set of fields that documents of this type must have. These could be used to create consistent groups of documents, all containing the same fields and rendered using the same template.

For web browser access, Lenya uses XSLT templates to transform content to well-formed XHTML. Styling is done via CSS. According to the documentation on the Lenya wiki, the look and feel of the entire site can be changed relatively easily by editing a handful of XSLT files.

Elegance

As Lenya is built on tried and tested Apache Jakarta components, the quality of the code is very high. A cursory look at the code layout suggests that good design practice has been followed throughout. In addition, the presence of a comprehensive suite of unit tests provides a useful method of discerning the impact of any modifications one might make to the code.

If you want to learn the system, the documentation is highly technical and quite "academic": you would need to make a serious investment in understanding Cocoon if you wanted to do a lot of customisation. However, the wiki contains several tutorials which should make learning the system easier.

Cocoon should also integrate readily with other systems, as it is based on open standards and stores its content as XML. In addition, there is an API to facilitate integration with other tools. A plugin API is also at the proposal stage.

Related articles: