[SLING-4275] API: RenderContext Object Traversal

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[SLING-4275] API: RenderContext Object Traversal

Felix Meschberger-3
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
Reply | Threaded
Open this post in threaded view
|

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

Carsten Ziegeler
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
[hidden email]
Reply | Threaded
Open this post in threaded view
|

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

Radu Cotescu-3
Hi,

We could extract those methods into a utility class.

Cheers,
Radu

On Mon, Jan 12, 2015 at 1:45 PM, Carsten Ziegeler <[hidden email]>
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
> [hidden email]
>
Reply | Threaded
Open this post in threaded view
|

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

Carsten Ziegeler
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 <[hidden email]>
> 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
>> [hidden email]
>>
>


--
Carsten Ziegeler
Adobe Research Switzerland
[hidden email]
Reply | Threaded
Open this post in threaded view
|

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

Radu Cotescu-3
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 <[hidden email]>
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 <[hidden email]>
> > 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
> >> [hidden email]
> >>
> >
>
>
> --
> Carsten Ziegeler
> Adobe Research Switzerland
> [hidden email]
>