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:36 UTC

[SLING-4275] API: ResourceResolution helper

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

Re: [SLING-4275] API: ResourceResolution helper

Posted by Radu Cotescu <ra...@cotescu.com>.
Sure. I created https://issues.apache.org/jira/browse/SLING-4304.

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

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

Re: [SLING-4275] API: ResourceResolution helper

Posted by Carsten Ziegeler <cz...@apache.org>.
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 <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.
>>>
>>> #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
>> cziegeler@apache.org
>>
> 


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

Re: [SLING-4275] API: ResourceResolution helper

Posted by Chetan Mehrotra <ch...@gmail.com>.
On Tue, Jan 13, 2015 at 1:41 PM, Radu Cotescu <ra...@cotescu.com> 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

Re: [SLING-4275] API: ResourceResolution helper

Posted by Radu Cotescu <ra...@cotescu.com>.
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 <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.
> >
> > #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
> cziegeler@apache.org
>

Re: [SLING-4275] API: ResourceResolution helper

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.
> 
> #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
cziegeler@apache.org