Advantage of Sling Models | Community
Skip to main content
AEM_Forum
New Participant
April 16, 2017
Solved

Advantage of Sling Models

  • April 16, 2017
  • 3 replies
  • 1707 views

Hi,

I read a lot on Sling Models, but not able to comprehend the real Advantage of of Sling Models.

  • Entirely annotation driven. "Pure" POJOs.
  • Use standard annotations where possible.
  • Pluggable
  • OOTB, support resource properties (via ValueMap), SlingBindings, OSGi services, request attributes
  • Adapt multiple objects - minimal required Resource and SlingHttpServletRequest
  • Client doesn't know/care that these objects are different than any other adapter factory
  • Support both classes and interfaces.
  • Work with existing Sling infrastructure (i.e. not require changes to other bundles).

Could you please show me a real world example where Sling Models come to the rescue?

Without Sling Models, how we would have implemented that functionality and what are the pain points we would have faced?

Appreciate your support.

Thanks,

Rama.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kautuk_sahni

Hi 

The Documentation on Sling models explain it well :- https://sling.apache.org/documentation/bundles/models.html

But apart from this, i would like to you also have a look at this reference slides:

Link:- https://www.slideshare.net/accunitysoft/understanding-sling-models-in-aem

// It covers what/why/how/demo of Sling Models

 

How to do it without Sling Model?

Link:- https://www.slideshare.net/AEMHub2014/sling-models-by-justin-edelson-final

 

I hope this would help.

~kautuk 

3 replies

Feike_Visser1
Employee
April 17, 2017

You can also watch the new core components (available in 6.3) here: https://github.com/Adobe-Marketing-Cloud/aem-core-wcm-components

They have HTL + Sling models

AEM_Forum
AEM_ForumAuthor
New Participant
April 17, 2017

Hi all,

Thanks for all your replies.

They are very informative.

Thanks,

Rama.

kautuk_sahni
kautuk_sahniAccepted solution
Employee
April 17, 2017

Hi 

The Documentation on Sling models explain it well :- https://sling.apache.org/documentation/bundles/models.html

But apart from this, i would like to you also have a look at this reference slides:

Link:- https://www.slideshare.net/accunitysoft/understanding-sling-models-in-aem

// It covers what/why/how/demo of Sling Models

 

How to do it without Sling Model?

Link:- https://www.slideshare.net/AEMHub2014/sling-models-by-justin-edelson-final

 

I hope this would help.

~kautuk 

Kautuk Sahni