Once I needed to write several debugging servlets for some functionality. Those servlets had to accept a big pile of parameters and I was tired of having tens of rows like String paramValue = request.getParameter(“paramName”). Luckily, I’ve already known Sling Models. So I’ve decided to find the way to inject these parameters into the model, […]
Category: aem
Sling Models: Why do I like @Self annotation?
At some point, Hexagonal architecture has been introduced to me. It espouses a one-way flow of dependencies – from the outside, in. And this is a great way to increase maintainability. However, we still need to access request and other external resources in our Sling Models. That is where @Self annotation can be used. @Self […]