During the last two or three years there has been a growing interest within the software industry in agile methods, rapid application development (RAD) and simplicity. It seems that the pendulum is swinging back from heavy-handed enterprise dogmas. "Getting things done" is of value again.
This development has largely been triggered, and embodied, by full-stack web frameworks like Ruby on Rails, Django, Seam, Rife or Grails. They proved that solid engineering and being able to build a web application in 15 minutes are not mutually exclusive. However, all of these frameworks use a relational data base for persistence. Why? RDBMSs possess characteristics that render them less than ideal for rapid application development. In particular, the data needs to be structured upfront and is hard to change as the application changes. I believe it’s time to move on to JCRs.
Content repositories provide a lot of the core infrastructure that many web applications need straight out of the box. There is fine granular access control, versioning, search, change notification etc. But most importantly, JCRs provide dynamic extensibility of the node types. This is especially helpful in RAD environments where most requirements are unknown and therefore, changes to the data structure must be painless.
This is where microsling comes in. It is a web application framework that can be used for RAD, but it uses a JCR for persistence. The content is presented and modified through server-side scripts (written in JavaScript, Ruby or other scripting languages). These scripts have access to the repository objects, like the requested node and its properties, so that script authors can easily generate output such as a web page.
Just like the content they are supposed to render, the scripts are stored in the repository ("Everything is content", remember?). Since the repository can be mounted as a WebDAV drive there is no more need to re-deploy a war file as is the case for Java-based web applications. A simple "save" and "reload" in the browser is enough to see your changes. This is a BIG deal when you want to write a web application in a hurry.
The microsling approach also dramatically lowers the entry barrier to writing JCR-based web applications in terms of required skills. You do not need to code Java, JSPs etc anymore, JavaScript is enough. At last, using a JCR may become attractive to the PHP crowd.
Microsling is really a sub-project of project "Sling", which is currently in incubator status at Apache. Sling has similar aims to those of microsling but is focused on more enterprise-relevant features. For example, it is built upon OSGi which allows powerful plugin management (you might know OSGi from Eclipse). Think of Sling as some kind of upgrade path for later, but you do not need to be concerned with it at the beginning.
In the next posts I will take a closer look at microsling and prepare a tutorial to get you started playing around with it.
