Many developers dive into the product without steeping themselves in Appcelerator’s philosophy, which can be a mistake. Over time (after reading hundreds of Q&A threads, blogposts, API documentation, guides, JIRA reports, and even source code), the developer starts to form a more complete picture of the platform and finds the best ways to structure his code. This guide is intended to jumpstart that process, to help you get from quick-n-dirty prototype to a fully functioning mobile app.
Continue reading Titanium Mobile – Beyond the Prototype
If you work with Titanium Mobile to do anything reasonbly complex, you’re bound to run into a number of issues that will cost you a great deal of time and possibly part of your sanity. I’ve compiled some of the worst things I’ve encountered here to save others some of the frustration I’ve had.
Continue reading Titanium Mobile – Gotchas
When you’re building an intricate user interface with Titanium Mobile, you’ll absolutely want to organize your UI elements into well-designed CommonJS modules. This makes it easy to reuse components throughout your app and even across other apps. It’s also a lot easier for maintainers to deal with it if you organize it well.
Continue reading Titanium Mobile – Extending Views with CommonJS
It’s critical in Titanium Mobile that you follow best practices in your application design. There are three different methods that have been used by Titanium Mobile developers during its relatively short lifetime. There is really only one you should use at this point; I will cover the others so that you can recognize them when you encounter them online (there are still people using these techniques).
- namespacing: create a global variable and add properties to that global variable via modules that you include() into your code. DON’T DO THIS!
- CommonJS: build modules that are each isolated from the global namespace and explicitly define the interface for that module. DO THIS!
More information on these strategies is found here:
All guidance from Appcelerator points to using CommonJS modules. It is the best way to build a robust single-context application that is free from nasty memory management issues.
So how do you structure your modules? I will illustrate a number of different techniques here.
Continue reading Titanium Mobile – CommonJS Fundamentals