Should I use sling model class or implicit properties for my component ?
I have a component and it has 7 dialog properties and 5 fields are straightforward fields and there is no business logic, 2 fields needs some manipulation. It is return the same way what is authored. I have two options
Case 1 : All 7 fields are simple and return simple string.
Method 1 - Use ${properties.prope1}
Method 2 - Create sling model class and get the property value, like ${myslinemodel.prop1}
Which method is recommended one for Case 1 and why?
Case 2 : only 2 fields needs to have some manipulation and 5 fields return simple return
Method 1 - Use ${properties.prope1} for simple dialog fields and Use ${myslinemodel.prop2} for the backend manipulation
Method 2 - Use ${myslinemodel.prop2} for all 7 fields.
Which method is recommended one for Case 2 and why?
We know both methods works but still wanted to know which method is preferred one.