Carlos Perez puts OSGI and JCR number 5 and 4 in his list of top Java-based technologies to learn in 2008.
We 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 ;-)
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.
From 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.
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.
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/
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:
<dependency> <groupId>javax.jcr</groupId> <artifactId>jcr</artifactId> <version>1.0</version> </dependency>
See the email@example.com list for more details.