Best practices & recommendations

  • Use the initialize method for initializing class variables (with default values) and start loading data in the loaded method (web service calls, etc.). Otherwise there are unexpected results as the observable values may be set before the view is visible in the DOM which may cause binding problems...
  • Language strings from the same package as the view or view model class are preloaded (available even in the initialize method) and can be read without a callback: Just use var str = this.getString("myString") or var str = visto.getString("myString", module).

Last edited Aug 30, 2013 at 6:41 PM by rsuter, version 5

Comments

No comments yet.