Hi,

My comments are inline.

On Sunday, 1 May 2016, Oliver Lietz <apa...@oliverlietz.de> wrote:

> On Saturday 30 April 2016 22:04:57 Vlad Bailescu wrote:
> > On Saturday, 30 April 2016, Oliver Lietz <apa...@oliverlietz.de
> <javascript:;>> wrote:
> > > (service ranking is not honored by Sling's script engine manager, no
> need
> > > to try).
> >
> > Any idea why this is not a bug?
>
> Why do you think it should be a bug?


Because Sling generally uses the service ranking and it's a great mechanism.


> Sling's Scripting support is built around Java's Scripting API (JSR-223)
> and
> that was obviously not designed to handle multiple script engines for one
> extension or mime type. So it is a limitation in Java's Scripting API.
>

The implementation could use service ranking as an optional/custom
extension of the standard.


> >   https://issues.apache.org/jira/browse/SLING-4330
> >
> >
> > I was under the impression SLING-4330 is about using both Sightly and
> > Thymeleaf in the same running instance; and how to solve which one gets
> > used on a file/script level.
>
> Right.
>
> > But for using just one scripting engine (Thymeleaf in this case) for a
> > given extension we could just use the service ranking.
>
> What is the benefit?
>
> If you give Thymeleaf's script engine a higher service ranking than
> Sightly's
> to render HTML templates (.html) you make Sightly quite useless. The
> result is
> similar to deactivating/deinstalling Sightly's bundles (correct me if I'm
> wrong).
>
> The other way round is not that destructive because Thymeleaf's script
> engine
> can be configured for different extensions (e.g. .htm, .thtml), can handle
> not
> only HTML but also XML, CSS, JavaScript, text and raw templates and makes
> its
> TemplateEngine available as OSGi service to render templates outside of
> Sling's Scripting context (see Fling sample).
>
> So unless SLING-4330 is implemented and you want to use Thymeleaf for .html
> just deinstall Sightly.
>

Right, but that seems a bit counter-intuitive since Sightly ships as
default with Sling. From an user point of view it would make sense to just
bump the ranking of Thymeleaf to make it "cut in front" instead of
uninstalling something.

This will not solve SLING-4330, of course, but will provide a better user
experience, IMO.


> Regards,
> O.


>
Best,
Vlad


-- 
Sent from mobile

Reply via email to