jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Meschberger <fmesc...@gmail.com>
Subject RE: [Proposal] Sling
Date Thu, 09 Aug 2007 07:39:43 GMT
Hi Noel,

Am Mittwoch, den 08.08.2007, 23:12 -0400 schrieb Noel J. Bergman:
> > As such each request URL addresses a Content object which in turn
> > resolves to a Component, which finally is responsible for handling
> > the request and providing a response.
> 
> And this differs from a Servlet/Portlet, how?

With Servlet/Portlet the URL resolves to the Servlet/Portlet directly
and the Servlet/Portlet has to care for itself to acquire the data to
act upon. With Sling, the framework resolves the URL to data and from
the data resolves the Component (the entity corresponding to
Servlet/Portlet). When the Component is called, the data is provided to
the Component and the Component does not have to care about getting to
it.

> > Recognizing the need to componentize development of Web
> > Applications and have easy mix and match for such
> > components to build web pages, the basic building blocks
> > of web pages are called components.
> 
> Differing from JSR-168/JSR-286 Portlets, how?  Other than "by leveraging the OSGi core
service platform specification"?

In some sense components are comparable to Portlets. But while a Portlet
just cares to render itself and generally does not know anything about
the other portlets (obviously JSR-286 tries to overcome this limit). In
Sling on the other hand, there is now almighty mother container, which
knows about all components on a page to render.

Sling just resolves the URL to data and to a Component. This component
then is responsible for rendering the complete page or finding more data
to be included. Include means, the data (in terms of a Java object
implementing the Content interface) is given to Sling to resolve the
Component to call. At the end of the page rendering process, Sling has
just actively resolved the initial data/Component and was involved in
further processing but did not control the actuall process.

Consider a page containing a page title and a paragraph system, which in
turn consists of a series of paragraphs. With Sling, the Component
responsible for the page would call include the page title and the
paragraph system content. The paragraph system content in turn would
include all paragraphs inside the paragraph system without the page
component knowing about this at all.

> 
> Obviously, looking for some details.  But not such that I'm voting on the answer.

I hope, this helps shed some more light on it.

Regards
Felix


Mime
View raw message