Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Advantage of Sling Models

Avatar

Level 10

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.

1 Accepted Solution

Avatar

Correct answer by
Administrator

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

View solution in original post

3 Replies

Avatar

Correct answer by
Administrator

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

Avatar

Level 10

Hi all,

Thanks for all your replies.

They are very informative.

Thanks,

Rama.

Avatar

Employee

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