You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Felix Meschberger <fm...@adobe.com> on 2015/01/12 10:44:31 UTC

[SLING-4275] API: RenderContext Object Traversal

Hi all

Carsten started to review the Sightly Engine API in SLING-4275 [1]. Since this issue covers 4 topics, I think it would be best to quickly discuss these topic in separate threads.

#4 RenderContext Object Traversal

The Sightly Engine provides functionality for extensions to transparently travers object hierarchies to implement Sightly Expressions.

The methods to do so are currently exposed in the RenderContext object which is created for each evaluation of a Sightly Template/Script.

Question is whether we should expose this traversal functionality as a service. As such this traversal would be „globally applicable“ and could not be adapted to each call. Also extensions would have another reference to a service.

WDYT ?


Regards
Felix

[1] https://issues.apache.org/jira/browse/SLING-4275

Re: [SLING-4275] API: RenderContext Object Traversal

Posted by Radu Cotescu <ra...@apache.org>.
However, I just realised that those methods need to be accessible outside
of the o.a.s.s.sightly bundle for people who implement RuntimeExtensions.

On Tue, Jan 13, 2015 at 12:54 PM, Carsten Ziegeler <cz...@apache.org>
wrote:

> Am 13.01.15 um 10:03 schrieb Radu Cotescu:
> > Hi,
> >
> > We could extract those methods into a utility class.
>
> I would prefer that, but on the other hand if its just me... :)
>
> Carsten
>
> >
> > Cheers,
> > Radu
> >
> > On Mon, Jan 12, 2015 at 1:45 PM, Carsten Ziegeler <cz...@apache.org>
> > wrote:
> >
> >> Am 12.01.15 um 10:44 schrieb Felix Meschberger:
> >>> Hi all
> >>>
> >>> Carsten started to review the Sightly Engine API in SLING-4275 [1].
> >> Since this issue covers 4 topics, I think it would be best to quickly
> >> discuss these topic in separate threads.
> >>>
> >>> #4 RenderContext Object Traversal
> >>>
> >>> The Sightly Engine provides functionality for extensions to
> >> transparently travers object hierarchies to implement Sightly
> Expressions.
> >>>
> >>> The methods to do so are currently exposed in the RenderContext object
> >> which is created for each evaluation of a Sightly Template/Script.
> >>>
> >>> Question is whether we should expose this traversal functionality as a
> >> service. As such this traversal would be „globally applicable“ and could
> >> not be adapted to each call. Also extensions would have another
> reference
> >> to a service.
> >>>
> >>
> >> We also have the option to make an utility class out of it. I think this
> >> stuff has general purpose and the RenderContext class itself is not
> >> really the right place for it.
> >>
> >> The least we should do is move this to a separate interface and have a
> >> getXYZ method in the RenderContext to avoid bloating of that
> >> RenderContext interface with utility stuff.
> >>
> >> Carsten
> >> --
> >> Carsten Ziegeler
> >> Adobe Research Switzerland
> >> cziegeler@apache.org
> >>
> >
>
>
> --
> Carsten Ziegeler
> Adobe Research Switzerland
> cziegeler@apache.org
>

Re: [SLING-4275] API: RenderContext Object Traversal

Posted by Carsten Ziegeler <cz...@apache.org>.
Am 13.01.15 um 10:03 schrieb Radu Cotescu:
> Hi,
> 
> We could extract those methods into a utility class.

I would prefer that, but on the other hand if its just me... :)

Carsten

> 
> Cheers,
> Radu
> 
> On Mon, Jan 12, 2015 at 1:45 PM, Carsten Ziegeler <cz...@apache.org>
> wrote:
> 
>> Am 12.01.15 um 10:44 schrieb Felix Meschberger:
>>> Hi all
>>>
>>> Carsten started to review the Sightly Engine API in SLING-4275 [1].
>> Since this issue covers 4 topics, I think it would be best to quickly
>> discuss these topic in separate threads.
>>>
>>> #4 RenderContext Object Traversal
>>>
>>> The Sightly Engine provides functionality for extensions to
>> transparently travers object hierarchies to implement Sightly Expressions.
>>>
>>> The methods to do so are currently exposed in the RenderContext object
>> which is created for each evaluation of a Sightly Template/Script.
>>>
>>> Question is whether we should expose this traversal functionality as a
>> service. As such this traversal would be „globally applicable“ and could
>> not be adapted to each call. Also extensions would have another reference
>> to a service.
>>>
>>
>> We also have the option to make an utility class out of it. I think this
>> stuff has general purpose and the RenderContext class itself is not
>> really the right place for it.
>>
>> The least we should do is move this to a separate interface and have a
>> getXYZ method in the RenderContext to avoid bloating of that
>> RenderContext interface with utility stuff.
>>
>> Carsten
>> --
>> Carsten Ziegeler
>> Adobe Research Switzerland
>> cziegeler@apache.org
>>
> 


-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

Re: [SLING-4275] API: RenderContext Object Traversal

Posted by Radu Cotescu <ra...@apache.org>.
Hi,

We could extract those methods into a utility class.

Cheers,
Radu

On Mon, Jan 12, 2015 at 1:45 PM, Carsten Ziegeler <cz...@apache.org>
wrote:

> Am 12.01.15 um 10:44 schrieb Felix Meschberger:
> > Hi all
> >
> > Carsten started to review the Sightly Engine API in SLING-4275 [1].
> Since this issue covers 4 topics, I think it would be best to quickly
> discuss these topic in separate threads.
> >
> > #4 RenderContext Object Traversal
> >
> > The Sightly Engine provides functionality for extensions to
> transparently travers object hierarchies to implement Sightly Expressions.
> >
> > The methods to do so are currently exposed in the RenderContext object
> which is created for each evaluation of a Sightly Template/Script.
> >
> > Question is whether we should expose this traversal functionality as a
> service. As such this traversal would be „globally applicable“ and could
> not be adapted to each call. Also extensions would have another reference
> to a service.
> >
>
> We also have the option to make an utility class out of it. I think this
> stuff has general purpose and the RenderContext class itself is not
> really the right place for it.
>
> The least we should do is move this to a separate interface and have a
> getXYZ method in the RenderContext to avoid bloating of that
> RenderContext interface with utility stuff.
>
> Carsten
> --
> Carsten Ziegeler
> Adobe Research Switzerland
> cziegeler@apache.org
>

Re: [SLING-4275] API: RenderContext Object Traversal

Posted by Carsten Ziegeler <cz...@apache.org>.
Am 12.01.15 um 10:44 schrieb Felix Meschberger:
> Hi all
> 
> Carsten started to review the Sightly Engine API in SLING-4275 [1]. Since this issue covers 4 topics, I think it would be best to quickly discuss these topic in separate threads.
> 
> #4 RenderContext Object Traversal
> 
> The Sightly Engine provides functionality for extensions to transparently travers object hierarchies to implement Sightly Expressions.
> 
> The methods to do so are currently exposed in the RenderContext object which is created for each evaluation of a Sightly Template/Script.
> 
> Question is whether we should expose this traversal functionality as a service. As such this traversal would be „globally applicable“ and could not be adapted to each call. Also extensions would have another reference to a service.
> 

We also have the option to make an utility class out of it. I think this
stuff has general purpose and the RenderContext class itself is not
really the right place for it.

The least we should do is move this to a separate interface and have a
getXYZ method in the RenderContext to avoid bloating of that
RenderContext interface with utility stuff.

Carsten
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org