Clean libraries usage using `Ti.include`

Issue #110 new
Igor Santos repo owner created an issue

Currently we are using require() everywhere in the code to repeatedly get several libraries into the code, such as underscore or Q. This is bad because if we want to change a library for another one we have to replace the require text into several files.

We could be able to include then in the global scope using Ti.include() in the main app/start files. The question is: would those global objects be available inside the modules, such as the models and UI libraries?

We should not use Ti.include() for every new code package: although the overall app would get faster having every object included in the beginning, it would make quick actions slower, since sometimes the user just want to see one screen and it would load all objects that sometimes only other screens uses. So, Ti.include() only libraries and still require() the components.

Comments (0)

  1. Log in to comment