Reputation: 2180
Is it good practice to write all javascript "classes" as CommonJS modules within an Appcelerator Titanium Mobile app instead of using functions / object notation to create a new "class" (or how you call them in javascript anyway)?
var module = require('lib/module');
instead of
var object = new MyClass();
Are there any disadvantages?
Upvotes: 3
Views: 1560
Reputation: 33345
I do not believe it is completely supported on all platforms and all versions of the SDK at this time.
See this issue in QA Forum
http://developer.appcelerator.com/question/125373/common-js-modules---no-build-on-device
and
Upvotes: 2