What is the difference between creating
@Model(adaptables = Resource.class, defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL)
public class MyModel { }
and
public class MyModel extends WCMUsePojo { }
What is the difference between creating
@Model(adaptables = Resource.class, defaultInjectionStrategy = DefaultInjectionStrategy.OPTIONAL)
public class MyModel { }
and
public class MyModel extends WCMUsePojo { }
This is pretty well covered in the Sling documentation and the main advantages are:
The drawback highlighted in the documentation (lacks flexibility in terms of component overlaying, relying on service.ranking configurations) is being tackled by SLING-5992 which allows mapping a certain model implementation to a resource type.