Expand my Community achievements bar.

SOLVED

How Sling Model Resolution works?

Avatar

Level 5

I was asked in an interview to explain step by step how sling model resolution works. I tried my best but as per the interviewer it wasn't enough. Can anyone please let me know stepwise how the sling model resolution occurs (interview-level). Thanks!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @arindam6600 , Sling model resolution is a sub-part of sling resolution. In the component .html file we have used the sling models. The sling model gets invoked when resolution occurs.

In simple terms, sling models are simple POJO classes that are mapped automatically with Sling Objects (resource, request objects) and allow us to access jcr node property values directly into java classes.

Please refer to the below article for more details:-

Hope this could help you !!

Regards

Shiv

 

 

 

Shiv Prakash

View solution in original post

2 Replies

Avatar

Community Advisor

Hi Arin,

 

Justin the original creator of Sling Model Framework does in depth explanation of how Sling Model Resolution works in his slides[1]

 

Sling models by Justin Edelson (slideshare.net)

 

Regards,

Peter

Avatar

Correct answer by
Community Advisor

Hi @arindam6600 , Sling model resolution is a sub-part of sling resolution. In the component .html file we have used the sling models. The sling model gets invoked when resolution occurs.

In simple terms, sling models are simple POJO classes that are mapped automatically with Sling Objects (resource, request objects) and allow us to access jcr node property values directly into java classes.

Please refer to the below article for more details:-

Hope this could help you !!

Regards

Shiv

 

 

 

Shiv Prakash