PDA

View Full Version : Controller's init() and App's launch() - Best practice?



romerve
3 May 2012, 11:20 AM
Hello,

Based on the docs, i can deduct that the controller's init() is sort of a constructor and it is executed before launch().

If i have some UI that i would like to make present as soon as the app starts, would it be better to create it and show it via the controller's init() or do "getController('myController')" and call a method to render the UI?

Thanks

scottmartin
3 May 2012, 12:27 PM
Controllers are for event listening. If you want to load a view at start, call it from launch.

Regards,
Scott.