[SLING-4275] API: ResourceResolution helper

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

[SLING-4275] API: ResourceResolution helper

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.

#5 ResourceResolution helper

The ResourceResolution helper kind of duplicates and/or extends functionality attributable to Script and Servlet Resolution.

The question is whether we want to move this API to the Sling API at the expense of increasing the respective API package version and thus requiring an update to other bundles just to cope with this extended methods …

(This actually blends into another discussion we should be having on the evolution of the Sling API itself: Whenever we update something in the Sling API, it has a potential dramatic ripple-down effect to other bundles. Lets not discuss this here and now, though)

WDYT ?

Regards
Felix

[1] https://issues.apache.org/jira/browse/SLING-4275
Reply | Threaded
Open this post in threaded view
|

Re: [SLING-4275] API: ResourceResolution helper

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.
>
> #5 ResourceResolution helper
>
> The ResourceResolution helper kind of duplicates and/or extends functionality attributable to Script and Servlet Resolution.
>
> The question is whether we want to move this API to the Sling API at the expense of increasing the respective API package version and thus requiring an update to other bundles just to cope with this extended methods …
>
> (This actually blends into another discussion we should be having on the evolution of the Sling API itself: Whenever we update something in the Sling API, it has a potential dramatic ripple-down effect to other bundles. Lets not discuss this here and now, though)
>
If this API is of general (scripting) use, we should put it into a
common place; if it's just for scripting we have the scripting api; if
it's more general, I think Sling API is the place.


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

Re: [SLING-4275] API: ResourceResolution helper

Radu Cotescu-2
Hi,

The ResourceResolution class provides helper methods for resource
resolution which are not available directly from the ResourceResolver /
ResourceUtil classes. The most important one,  albeit named poorly,
is org.apache.sling.scripting.sightly.ResourceResolution#resolveComponentRelative,
which handles resource inheritance chains.

I would argue that their use is more general than just scripting and that
the Sling API would be the correct place for them. However, I also don't
like the fact that we'd have to depend on a newer Sling API version in
Sightly.

Regards,
Radu

On Mon, Jan 12, 2015 at 1:43 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.
> >
> > #5 ResourceResolution helper
> >
> > The ResourceResolution helper kind of duplicates and/or extends
> functionality attributable to Script and Servlet Resolution.
> >
> > The question is whether we want to move this API to the Sling API at the
> expense of increasing the respective API package version and thus requiring
> an update to other bundles just to cope with this extended methods …
> >
> > (This actually blends into another discussion we should be having on the
> evolution of the Sling API itself: Whenever we update something in the
> Sling API, it has a potential dramatic ripple-down effect to other bundles.
> Lets not discuss this here and now, though)
> >
> If this API is of general (scripting) use, we should put it into a
> common place; if it's just for scripting we have the scripting api; if
> it's more general, I think Sling API is the place.
>
>
> Carsten
> --
> Carsten Ziegeler
> Adobe Research Switzerland
> [hidden email]
>
Reply | Threaded
Open this post in threaded view
|

Re: [SLING-4275] API: ResourceResolution helper

chetan mehrotra
On Tue, Jan 13, 2015 at 1:41 PM, Radu Cotescu <[hidden email]> wrote:
> However, I also don't
> like the fact that we'd have to depend on a newer Sling API version in
> Sightly.

Another option which can be looked into would be to add the new
methods in Sling API and then embed/inline that class within Sightly.
This assumes that added class is self sufficient and not dependent on
other class

Chetan Mehrotra
Reply | Threaded
Open this post in threaded view
|

Re: [SLING-4275] API: ResourceResolution helper

Carsten Ziegeler
In reply to this post by Radu Cotescu-2
Am 13.01.15 um 09:11 schrieb Radu Cotescu:
> Hi,
>
> The ResourceResolution class provides helper methods for resource
> resolution which are not available directly from the ResourceResolver /
> ResourceUtil classes. The most important one,  albeit named poorly,
> is org.apache.sling.scripting.sightly.ResourceResolution#resolveComponentRelative,
> which handles resource inheritance chains.

Alright, so what about doing the renaming/javadoc update first and then
see where to put it?

Carsten

>
> I would argue that their use is more general than just scripting and that
> the Sling API would be the correct place for them. However, I also don't
> like the fact that we'd have to depend on a newer Sling API version in
> Sightly.
>
> Regards,
> Radu
>
> On Mon, Jan 12, 2015 at 1:43 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.
>>>
>>> #5 ResourceResolution helper
>>>
>>> The ResourceResolution helper kind of duplicates and/or extends
>> functionality attributable to Script and Servlet Resolution.
>>>
>>> The question is whether we want to move this API to the Sling API at the
>> expense of increasing the respective API package version and thus requiring
>> an update to other bundles just to cope with this extended methods …
>>>
>>> (This actually blends into another discussion we should be having on the
>> evolution of the Sling API itself: Whenever we update something in the
>> Sling API, it has a potential dramatic ripple-down effect to other bundles.
>> Lets not discuss this here and now, though)
>>>
>> If this API is of general (scripting) use, we should put it into a
>> common place; if it's just for scripting we have the scripting api; if
>> it's more general, I think Sling API is the place.
>>
>>
>> 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: ResourceResolution helper

Radu Cotescu-2
Sure. I created https://issues.apache.org/jira/browse/SLING-4304.

On Tue, Jan 13, 2015 at 12:56 PM, Carsten Ziegeler <[hidden email]>
wrote:

> Alright, so what about doing the renaming/javadoc update first and then
> see where to put it?
>