Apache Sling - Bringing Back the Fun
Apache SlingTM is an innovative web framework that is intended to bring back the fun to web development.
Discussions about Sling happen on our mailing lists, see the Project Information page for more info.
Apache Sling in five bullets points
- REST based web framework
- Content-driven, using a JCR content repository
- Powered by OSGi
- Scripting inside, multiple languages (JSP, server-side javascript, Scala, etc.)
- Apache Open Source project
Apache Sling in a hundred words
Apache Sling is a web framework that uses a Java Content Repository, such as Apache Jackrabbit, to store and manage content.
Sling applications use either scripts or Java servlets, selected based on simple name conventions, to process HTTP requests in a RESTful way.
The embedded Apache Felix OSGi framework and console provide a dynamic runtime environment, where code and content bundles can be loaded, unloaded and reconfigured at runtime.
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.
News
- New Releases: Apache Sling Commons Testing 2.0.10, Apache Sling Commons Scheduler 2.3.4, Apache Sling Commons Log 3.0.0, Apache Sling Commons Log Service 1.0.0, Apache Sling Adapter 2.0.12, Apache Sling Installer Core 3.3.4, Apache Sling Launchpad API 1.1.0, Apache Sling Launchpad Installer 1.1.0, and Apache Sling Maven JSPC Plugin 2.0.6 (February 7th, 2012)
- New Releases: Apache Sling API 2.2.4, Apache Sling Adapter 2.0.10, Apache Sling Scripting JSP Taglib 2.1.6, Apache Sling Rewriter 1.0.2, Apache Sling JCR ContentLoader 2.1.4, Apache Sling JCR Base 2.1.2, Apache Sling Servlet Resolver 2.1.2, and Apache Sling Security 1.0.0 (January 30th, 2012)
- New Releases: Apache Sling Scripting API 2.1.4, Apache Sling Scripting Core 2.0.20, Apache Sling i18n 2.2.0, Apache Sling Installer Core 3.3.2, Apache Sling Scripting Java 2.0.2, and Apache Sling Scripting JSP 2.0.20 (January 16th, 2012)
- New Releases: Apache Adapter Annotations 1.0.0 and Apache Sling Maven Sling Plugin 2.1.0 (January 14th, 2012)
- New Releases: Apache Sling Settings 1.1.0, Apache Sling Commons ClassLoader 1.2.4, Apache Sling Commons Scheduler 2.3.2, Apache Sling Event 3.1.2, Apache Sling Installer Core 3.3.0, Apache Sling Installer Configuration Factory 1.0.4, Apache Sling Launchpad Installer 1.0.6, Apache Sling JCR Installer 3.1.2, and Apache Sling Thread Dumper 0.2.2 (January 6th, 2012)
- New Release: Apache Sling Jackrabbit User Manager 2.2.0 (November 15th, 2011)
- New Release: Apache Sling Maven Sling Plugin 2.0.6 (October 21st, 2011)
- New Release: Apache Sling Maven Launchpad Plugin 2.1.0 (September 9th, 20111)
- New Releases: Apache Sling Resource Bundle 1.0.0 and Parent POM 12
- New Releases: Apache Sling API 2.2.2, Apache Sling Commons Scheduler 2.3.0, Apache Sling Commons OSGi 2.1.0, Apache Sling Scripting Core 2.0.18, Apache Sling Installer Core 3.2.2, Apache Sling Installer Configuration Factory 1.0.2, Apache Sling Launchpad Installer 1.0.4, Apache Sling File Installer 1.0.2 (August 16th, 2011)
- New Release: Apache Sling Scripting JSP Support 2.0.18 (August 15th, 2011)
- Released new Apache Sling Parent POM 11 (August 8, 2011)
- New Release: Apache Sling Internationalization 2.1.2 (July 15, 2011)
- New Releases: Apache Sling Event 3.1.0, Apache Sling OSGi Installer 3.2.0, Apache Sling JCR Installer 3.1.0, Apache Sling Installer Configuration Factory 1.0.0, Apache Sling Launchpad Installer 1.0.2 (July 13th, 2011)
- New Release: Apache Sling Engine 2.2.4 (June 22nd, 2011)
- New Releases: Apache Sling Launchpad Standalone Archetype 1.0.0, Launchpad Webapp Archetype 1.0.0 (May 13th, 2011)
- New Releases: Apache Sling Scripting JSP Support 2.0.16, JSP Taglib 2.1.2 (May 3rd, 2011)
- New releases: Apache Sling Test Tools 1.0.2, JUnit Core 1.0.6, JUnit Remote Tests Runners 1.0.6, JUnit Scriptable Tests Provider 1.0.6, Sample Integration Tests 1.0.6, Sample Server-Side Tests 1.0.6, Failing Server-Side Tests 1.0.6 (April 26th, 2011)
- New releases: Apache Sling I18N 2.1.0 (April 12, 2011)
- New releases: Apache Sling 6, Apache Sling Launchpad Content 2.0.6 (March 28, 2011)
- New releases: Apache Sling Launchpad Integration Tests 1.0.0, Apache Sling Launchpad Testing Services 2.0.8, Apache Sling Launchpad Testing Services WAR 2.0.8 (March 04, 2011)
- New releases: Apache Sling Javascript 2.0.12 (February 26, 2011)
- New releases: Apache Sling Explorer 1.0.2, Apache Sling JCR Resource 2.0.10, Apache Sling Engine 2.2.2, Apache Sling Installer IT Testing 3.1.2 (February 24, 2011)
- New releases: Apache Sling Launchpad API 1.0.0, Launchpad Installer 1.0.0 Launchpad Base 2.3.0, Maven Launchpad Plugin 2.0.10, Apache Sling Commons Testing 2.0.8 (February 20, 2011)
- New release: Apache Sling Servlets Get 2.1.2 (February 18, 2011)
History
Sling started as an internal project at Day Software, and entered the Apache Incubator in September 2007. As of June, 17th, 2009 Apache Sling is a top level project of the Apache Software Foundation.
The name "Sling" has been proposed by Roy Fielding who explained it like this:
[The name is] Biblical in nature. The story of David: the weapon he uses to slay the giant Goliath is a sling. Hence, our David's [David Nuescheler, CTO of Day Software] favorite weapon.
It is also the simplest device for delivering content very fast.
Who uses Sling?
See Who is using Sling on our public wiki.
Getting started
If you prefer doing rather than reading, please proceed to Discover Sling in 15 minutes or read through the recommended links in the Getting Started section, where you can quickly get started on your own instance of Sling.
| Excuse our mess while we redesign Sling has undergone an important redesign in the last few months, and we're not done updating this website yet. The status of each page is indicated by a note like this at the top of each page. Pages which do not have such a note should be considered not reviewed: the information that they contain might be out of sync with the current Sling codebase. |
Contents
- Documentation - Here you will find the documentation on Sling
- Development – Documentation on how to develop web applications with Sling and what tools you have at your disposal
- Links
- Wiki
- FAQ
- Project Information
Use Cases for Sling
Wiki
Day built a Wiki system on Sling. Each Wiki page is a node (with optional child nodes) in the repository. As a page is requested, the respective node is accessed and through the applying Component is rendered.
Thanks to the JCR Mapping and the resolution of the Component from the mapped Content, the system does not care for what actual node is addressed as long as there is a Content mapping and a Component capable of handling the Content.
Thus in the tradition of REST, the attachement of a Wiki page, which happens to be in a node nested below the wiki page node is easily accessed using the URL of the wiki page attaching the relative path of the attachement ode. The system resolves the URL to the attachement Content and just calls the attachement's Component to spool the attachement.
Digital Asset Management
Day has implemented a Digital Asset Management (DAM) Application based on Sling. Thanks to the flexibility of the Content/Component combo as well as the service registration/access functionality offered by OSGi, extending DAM for new content type is merely a matter of implementing one or two interfaces and registering the respective service(s).
Again, the managed assets may be easily spooled by directly accessing them.
Web Content Management
Last but not least, Sling offers itself very well to implementing a Web Content Management system. Thanks to the flexibility of rendering the output - remember: the system does not care what to render, as long as the URL resolves to a Content object for which a Component exists, which is called to render the Content - providing support for Web Content authors (not PHP programmers but users out in the field) to build pages to their likings can easily be done.
References
Apache Jackrabbit
The main purpose of Sling is to develop a content-centric Web Application framework for Java Content Repository (JCR) based data stores. Sling is implemented - with the notable exception of JCR Node Type management - purely in terms of the JCR API and as such may use any JCR compliant repository. The default implementation for Apache Jackrabbit is provided out of the box.
OSGi
Sling is implemented as a series of OSGi Bundles and makes extensive use of the OSGi functionality, such as lifecycle management and the service layer. In addition, Sling requires several OSGi compendium services to be available, such as the Log Service, Http Service, Configuration Admin Service, Metatype Service, and Declarative Services.
Apache Felix
While Sling does not require a specific OSGi framework implementation to run in, Sling is being developed using Apache Felix as the OSGi framework implementation. It has not been tested yet, but it is expected that Sling also operates perfectly inside other OSGi frameworks such as Equinox and Knopflerfish.