OSGi (#5) + JCR (#4) = Sling

January 31, 2008

Carlos Perez puts OSGI and JCR number 5 and 4 in his list of top Java-based technologies to learn in 2008.

While I’m not a big fan of “top five” lists (except in High Fidelity), I can’t help but note that Sling will help you grasp both #5 and #4, in a gentle way. See you there!

Discover Sling in 15 minutes

January 29, 2008

sling-logo-110x63.pngWe finally got around to documenting the Sling Launchpad (previously known as µsling 2.0) – so grab that while it’s hot: Discover Sling in 15 minutes will tell you everything you didn’t dare to ask. Well, some of it, at least.

I’m very happy with how Sling has evolved since the beginning of the microsling-driven partial rewrite: concepts have been clarified, the code structure is much easier to understand, we have tons of automated tests, and we’re (slowly but surely) reaching a stable state that will allow people to have a closer look and hopefully start contributing more.

And it also looks like we’re done renaming things every week ;-)

By the way, thanks to GHOP student Paul Walker, Sling got a new and improved logo – big thanks!

Abdera + JCR = Atom server?

January 25, 2008

Like several other people I think Atom and JCR are made to collaborate.

I just had a look at the JCR CollectionProvider that Dan Diephouse created for Abdera, and it’s cool stuff! The Test code shows how easy it is to setup Abdera to use a JCR Repository for storage.

Having APP besides WebDAV as an access protocol for JCR repositories would be great. JCR semantics are richer than both of these protocols, but having multiple content access and manipulation methods accessing the same storage is very helpful in many cases.

Apache Jackrabbit 1.4 released

January 16, 2008

Congratulations to the Jackrabbit team for their 1.4 release.

I’ve been using the Jackrabbit trunk in the last few months for my work on Sling, and although 1.4 is not a “big bang” release, the many things added and fixed make a lot of difference.

See Jukka’s post for more details.

microsling – Yet Another (cool) Web Applications Framework

October 12, 2007

sling-logo.pngFrom the new and improved department: I spent part of this week writing a “reduced to the max” version of the Sling core that I’ve called microsling.

That’s been a lot of fun of course, and I think the results are fairly impressive in terms of power per line of code, thanks to the power of the JCR API. Using “modern” Java, with scripting in the right places, helps a lot as well, but that’s nothing new.

In its current state, microsling allows you to use SlingServlets to process HTTP requests in a RESTful way, acting on abstract Resources and using “pluggable” request processing scripts in various languages.

A few useful SlingServlets are provided to create content and to render it using either Velocity templates or server-side javascript.

All this in less than 1’200 lines of Java code, all inclusive.

I’m not sure yet if microsling matches the complete vision of the Sling request processing, but this is already powerful stuff – and very simple to use.

See SLING-47 and the sling-dev list for more info. The microsling homepage is attached to SLING-47 and contains an overview of the request processing mechanism, including links to the source code for a quick walkthrough.

Or get the code straight from the Sling whiteboard if you want to play with it. Fifteen minutes should be enough to build and run it if you have a JDK 1.5, Maven 2.0.7 and a WebDAV client.

The full Sling codebase can be overwhelming to start with, as there are lots of (useful) stuff in there: OSGi helpers and management console, a JSP compiler, JCR utilities, etc. This is an attempt to demonstrate the core Sling principles in a much simpler way, by getting rid of all the ancillary stuff (which deserves to be better organized in Sling, but that’s another story).

Let’s hope the current API redesign and the microsling effort help us communicate more clearly the Sling vision to the JCR community, in order to give it the audience that it deserves!

Update: the code has been moving around since I wrote this (and deleted from Sling’s svn as we incorporated its ideas into Sling later), to get it you need an svn client now:
svn export -r 584116 http://svn.apache.org/repos/asf/incubator/sling/whiteboard/microsling@584116

Update: if you’re really nostalgic, microsling is back at https://svn.apache.org/repos/asf/sling/whiteboard/microsling/

jcr-1.0.jar added to the central Maven repository

October 9, 2007

After some license clarifications, the jcr-1.0.jar is finally available in the central Maven repository.

This means that you just need this in your Maven 2 pom.xml to use the JCR API in your code:


See the dev@jackrabbit.apache.org list for more details.