Search code examples
javascriptuser-interfacebusiness-logictitanium

separation of logic and UI in titanium (javascript)


i'm new to appcelerators titanium and javascript and i'm interested in coding an iphone app. i recognized that there is a need of "many" code for creating the UI. that's no problem so far, but i tend to separate that code from my application logic wisely. what are the best practices?

[update] tweetanium is a great example how to structure a titanium mobile application


Solution

  • ok, i just found a cool practice.

    i include the con_file.js with the application logic the view_file.js with

    Titanium.include('../controller/con_file.js');
    

    now i'm able to access the hole data structure.