Model classes vs Interfaces
Hello,
I am slightly new to the world of sling models. More used to JSP and custom taglibs (and implementing my own "idea" of models by using reflections) than models. Whatever i have done with models is limited to simple injections, references and self injections.
Recently i was fooling around with some examples from the sling portal and came across this:
@Model(adaptables=Resource.class) public interface MyModel { @Inject String getPropertyName(); }
Then i started wondering why and when you would ever use interfaces? I tried simple parent child relations and it worked well. But when would i ever write model interfaces and in which scenarios would i ever use them and how does it work?
Pardon me if the question is too basic.. but just could not get this...
thanks,
Yadhu