Apache Sling gives a hand to Web devs facing huge projects

Web development can bury a team under mountains of HTML files, images, and non-development-related documents from marketing and management. Two years ago, as a way for Java developers to handle all that new “content,” the Apache Sling project began. Yesterday, the second release of this Java Content Repository (JCR) access framework was released within the Apache Foundation's incubator.
Carsten Ziegeler, a committer on the project, explained, “Without Sling, it is often very time-consuming to develop large websites with thousands of pages and even more content snippets displayed throughout the site. Therefore, we started to develop a platform for our content-based products, which enables the rapid and elegant development of content-based applications.

"Sling uses a Java Content Repository as the back-end store for all information. One of the major goals is to have a modular, scalable, extensible and flexible platform, which is also manageable. Therefore we choose OSGi as the underlying platform."

Day Software, the company behind much of the work on Apache Sling, started on this path toward a development environment focused on JSR-170 (Java Content Repositories), when its current CTO, David Nuescheler, became specification lead on JSR-170 in 2002. The spec was finalized in 2005, and just under two years later, Nuescheler's coworkers began building the Apache Sling framework to manage connections between Java applications and their JSR-170-compliant JCRs.

The idea is to stick all that Web content in a simpler repository, rather than spreading it around the hard drive of each Web server. Thus, content developers can slot images, text and other items into the content repository, rather than trying to keep track of individual assets as they move through the many segments of a company. Because the JCR manages content in a manner similar to an SCM system, developers using Sling can quickly tie this information into portlets or beans.

At Switzerland-based Day Software, Felix Meschberger (who can be seen as the father of Sling), Bertrand Delacretaz and Ziegeler worked to build a new API for dealing with content repositories. Said Ziegeler: “While the original idea was to have a framework based on JCR, it took us some time (and several complete rewrites) to recognize that we shouldn't do that. [Rather, we should] base the whole framework on a more generic abstraction (which we call the resource API).

"Getting this API right, and providing enough functionality—but not too much—was the most tricky part. We spent nearly a year on this. But today we are very proud of this API as it makes Sling even more powerful and elegant."

This API layer allows developers to use scripting languages or straight Java to dictate the manner in which Web content is handled on its way to the client-side. Apache Sling is available for free from the Apache Foundation's website.

BY Alex Handy

Copyright © 1999-2009 BZ Media LLC, all rights reserved.



Copyright 2008-2009 Daily IT News | Contact Us