Sling Resource Resolution and AEM - Part 1
Veena Vikraman
Adobe Experience League Community Advisor (AEM). Adobe Certified AEM Architect and Senior Developer. Python , React Beginner.
I assume Sling Resolution might be the most searched key word by any AEM developer. ( I don't have the statistics ?? Its just a guess work based on my experience). And I think this is that one topic which I feel ( my personal opinion totally ??) most of the junior AEM developers or freshers don't give much importance to. They just jump into development without understanding the underlying architecture of AEM. I don't blame them, that's how the system works, as soon as you finish training , you are expected to develop high quality components from day one ( which in my opinion is an over expectation from a fresher or a newly trained resource in AEM ). In that process you compromise the quality part.
With out understanding how the content is saved or how it is retrieved, developers just blindly follow what they have been told. For eg:- Let's say Mr X is newly trained in AEM and I asked him to develop a simple title component. Now Mr X is really confident and he go ahead and develop the component. He gives his text field a property name ./title and fetches the value like ${properties.title} . Everything is correct till now. You or me doesn't find an issue till here. Now when I ask Mr. X where does this value save in the repository , is when Mr X gets confused ( in most of the case I have seen). If he has not understood how the content is handled in AEM, Mr X will not be able to answer me.
I actually don't blame them for that. When I was starting development in AEM, it took me a lot of time to actually understand Sling and Sling Resolution. But, at that time, there were very less articles or documentation around the topic. It was 100% peer learning and in that process Adobe Community forums has a played a huge role. But when I was really confident on the concept of Sling resolution, I got a lot of confidence as an AEM developer.
Developing components is really easy in AEM. There are a lot of tutorials available now which help any one with an AEM instance setup to start component development without any training. And if you develop one or two component and go through few of the we-retail or WKND components it won't be a big deal for you to develop a component afterwards. But the real challenge will be in understanding the concepts. In my opinion one of the main concept you have to be thorough as an AEM developer is "Sling Resource Resolution" . You might have heard of this term a lot of times. You have heard it that many times because it is that much important. Sometimes when I ask someone what is Sling resolution? define in your own words , they say its sling:resourceSuperType. I know they have understood sling resolution more on that terms . But it is more than sling:resourceSuperType . It is the whole mechanism by which Sling resolves and delivers your content when you request for one.
I started to write this article thinking I will just explain Sling Resolution and then finish it off ??, but guess what , I didn't even start and have almost wrote half page of an article. ??. So let me wrap this part . Before that I would request any AEM developer reading this to make sure to understand the basic principles of Sling and AEM. There are not many , but whatever is there , make sure you understand it properly. Trust me, it will give you a lot of confidence. It will make your life easy as an AEM developer. Take my word on that ??. I will write another article and explain Sling Resolution in my own words , trying to keep things less complicated.
Since this has gone way over I have part 2 which actually explains the Sling Resolution and you can find the same here https://www.dhirubhai.net/pulse/sling-resource-resolution-aem-part-2-veena-vikraman
PS:- All the above opinions are my own. Corrections are welcome ??