Project code and files layout

You must Login before you can answer or comment on any questions.

Hello, I am trying to start developing using Titanium Mobile, I've made an app already and got it on the App Store. But I am trying to figure out a way to format my projects, I mean, instead of having all code in app.js, how do you prefer to spread it out and organize to maintain readability etc. At the moment I having it like:

app.js: Global variables like config, and initialization code

UI.js: Code for creating all the buttons/labels etc

funcs.js: Everything else, events etc

Can anyone suggest a good way to organize everything?

— asked 2 years ago by Nick C
0 Comments

1 Answer

There is helium to create & reuse UI, though it hasn't been updated for awhile. or use JSS. due to the lack of documentation for JSS, I'm not a fan of either.

it's better to have config.js for variables and call Ti.include('config.js') in app.js

personally I adopt commonJS style to create libraries to be reused.

Your Answer

Think you can help? Login to answer this question!