I was creating a form on my app and it has validation. When a field is found invalid I show a red warning sign on the field (it's just a label).
Because I have many fields I've created a function that get the textfield
object, does a Ti.UI.createLabel
with my style, and top and left positioned by received object and add that to the page.
While this work perfectly, I got to think that it might not be the "correct" way to use Alloy. So I was wondering if I should have created an Alloy view (no controller needed since there's no logic), and that view will have the label (just label!) and tss
file with the fixed style, and then get the view the "Alloy way" and add it to the page?
What is the best practice in such a scenario? I also think that alloy adds it's own controller code and inside creating the label like I do now - so it adds additional actions for js engine to perform? performance and memory consumption is of course my main concern.