An architecture for content-centric web applications (Part 1)

posted 03:40PM Oct 20, 2007 with tags architecture content jcr microsling sling web webdevelopment by Lars Trieloff

One thing I enjoyed most at the HPI and Mindquarry were discussions with Hagen about architectures for content-centric applications. Interestingly after having some discussions, reading blog entries and mailing list posts with David (where is your blog), Carsten and Bertrand, I am surprised to see Sling and Microsling which looks like many of Hagen's ideas having come to life.

Unfortunately the Sling website does not have a good description of the big picture and overall architectural ideas, so I will try to explain the ideas I have identified in the next blog posts. The goal is to go from the very high level of abstraction down to concrete code and examples.

Let's start with the helicopter perspective: Users want to interact with content, want to read, write and modify content.

http://weblogs.goshaky.com/weblogs/lars/resource/contentweb1.png

(I am using the fundamental modeling concepts notation here. Boxes with angled corner are active system components, boxes with rounded corners are passive system components, storage.)

The way we usually implement this interaction is trough a web application that works as a proxy for the content.

http://weblogs.goshaky.com/weblogs/lars/resource/contentweb2.png

(The small bubble between user and web application is a communication channel, indicating that the user interacts with the web application by means of HTTP and the web browser)

Dealing with content usually means providing one human-readable representation of the content through a component I call renderer and providing a behavior for dealing with user inputs. This means validating user input, writing input to the storage if it is correct or triggering custom actions.

http://weblogs.goshaky.com/weblogs/lars/resource/contentweb3.png

In the next issue of this mini-series I will further examine the nature of renderers and behaviors and show how a framework can implement this architecture.