Resolving a Renderer
Geschrieben 2018. Versionen und Details können veraltet sein.
Resolving a renderer for a resource is not as simple as it seems. The team from apache sling shows me that the rendering is more complex and should be more than a simple content output.
In modern WCM a resource is an abstract thing containing more meta data than pure content. All the meta data together brings a useful content to the user. And there are different ways to present it. Html is the visible presentation of the data. Json and xml are technical presentations needed to download data in the background. Sling shows that we can have different renderers for the same content. It depends on the current use case.
How to find the correct content renderer is an interesting question. Sling is using request parameters like 'request method' and parts of the requested path to find a resource. Parameters from the resource are linking to the correct script rendering the content (see this picture).
In modern WCM a resource is an abstract thing containing more meta data than pure content. All the meta data together brings a useful content to the user. And there are different ways to present it. Html is the visible presentation of the data. Json and xml are technical presentations needed to download data in the background. Sling shows that we can have different renderers for the same content. It depends on the current use case.
How to find the correct content renderer is an interesting question. Sling is using request parameters like 'request method' and parts of the requested path to find a resource. Parameters from the resource are linking to the correct script rendering the content (see this picture).