Connect Apache Sling to Your Content

Tuesday, 3. September 2019 14:10 - 14:40 (30 min)

Outline

Apache Slings extensible content tree is a very powerful way to unify different content sources behind the resource provider abstraction. The resource API is easy to work with and integrating custom content into the tree is a breeze using the SPI.

However, a lot of code assumes, for historical reasons, that resources in Sling are actually backed by a Java Content Repository (JCR). This can be problematic as for example, a given resource can not necessarily be adapted to a Node nor be found via a Session.

In this talk we will first briefly explain the resource provider approach and its benefits as well as some of its downsides and pitfalls. Then, second, we will introduce a similar approach on the JCR level allowing developers to mount content into sub trees of the repository itself. Finally, we will compare the two approaches by showing how they can be used to integrate remote content sources into the resource tree and demonstrate that they can work together seamlessly.