Hi,

On Fri, Jul 18, 2014 at 12:06 AM, Olaf Otto <[email protected]> wrote:
> ...While
> there is some support for placing java files in the JCR and use them as
> servlets for specific resources, this approach is somewhat exotic and you're
> better of providing application code  - such as models - in OSGi bundles...

Absolutely agree with that, having business logic in bundles makes it
easier to test, version and manage that critical code than having code
scattered around the content repository.

I recommend Sling Models [1] for business logic today, as they allow
you to have your business logic in OSGi bundles, while keeping the
boilerplate code to a minimum. And they run on a bare Sling instance
with no extra dependencies.

I'm not a fan of using additional component management systems like
Spring or Guice on top of Sling . OSGi with declarative services
provides everything you need IMO, and you get that out of the box with
Sling, without having to mix several java component models.

I suppose people are using other tools because they are used to them,
but if you're starting new projects I wouldn't do that.

-Bertrand

[1] http://sling.apache.org/documentation/bundles/models.html

Reply via email to