BLOG
The Apache Sling Framework
By pulak - JCRDev | Posted on 2009-04-02 12:45
Apache Sling is a Web application framework for java platform based on REST principles that provides easy development of content-oriented applications. Sling uses a JSR-170 compliant JCR repository, such as Apache Jackrabbit, to provide storage, presentation, and management of data.
Sling started as an internal project at Day Software, and entered the Apache Incubator in September 2007 at The Apache Software Foundation (ASF).
Sling is being developed using Apache Felix as the OSGi framework (is an open standards organization founded in March 1999. The Alliance and its members have specified a Java-based service platform that can be remotely managed. The core part of the specifications is a framework that defines an application life cycle management model, a service registry, an Execution environment and Modules.) implementation. Apache Sling allows developers to deploy their application components as OSGi bundles or as scripts and templates in the content repository. Supported scripting languages are JSP, server-side JavaScript, Ruby, Velocity. The goal of Apache Sling is to expose content in the content repository as HTTP resources, fostering a RESTful style of application architecture.
It\'s main features are as follows
1. Apache Sling is the simplest device for delivering content very fast.
2. Content resolution that maps a request URL to a content node in the content repository
3. Servlet resolution that maps a content node and a request method to a Servlet handling the request
4. Default servlets supporting WebDAV, content creation from web forms and JSON representation
5. A Javascript client library, allowing access to the content repository through AJAX
6. Support for server-side scripting with Javascript, JSP, Ruby and Velocity
7. OSGi-based extensibility through Apache Felix - the Felix Web Console was originally developed by the Apache Sling project
Drawbacks:
1. The main issue is that most of the developers work for the same company (Day Software). The Apache Software Foundation requires projects to establish that they have a sustainable, distributed community of committers, and that\'s why it\'s still in incubation. Since the project\'s getting more attention though, I don\'t expect it to be too long before it "graduates."
2. The drawback of this method of service registration is that the services have to acquire other services whose functionality is used themselves and also have to observe the presence as services may come and go at any time. Though this observation is rather easy as basically a ServiceListener is to be implemented which listens for service registration and unregistration events, this is somewhat tedious and repeating for each service using other services.
As the first web framework dedicated to JSR-170 Java Content Repositories, Sling makes it very simple to implement simple applications, while providing an enterprise-level framework for more complex applications.
Apache Sling currently comes in four flavors:
1. A standalone application (a jar containing everything to get started with Sling)
2. A web application (just drop this into your favorite web container)
3. The full source package (interested in reading the source?)
4. Maven Artifacts (available through the Apache Incubator Repository)
BLOG STATS
5584 visitors have read this BlogPopular Posts
The Apache Sling FrameworkTemplate Creation in Day Communique 4.x
JCR and ECM Vendors
Writing Filters in Apache Sling Web Application
Sling based JCR Explorer
JCR DEVELOPERS (level, posts)

