what are the best Practices for developing applications using Titanium Framework targeting iPhone & Android?

依然范特西╮ 提交于 2019-12-05 02:27:19

问题


I am planning to develop an application using Titanium Framework for iPhone and Android. Can someone list the best practices, do's and don'ts for the development using your experience with the framework?


回答1:


this is more of a tip then anything but so far my favorite function has been the tt.os in tweetanium that handles passing of vars of functions to the correct platform.

and an example of how they use it




回答2:


First of all, there's the Appcelerator guide on Titanium's best practices: https://wiki.appcelerator.org/display/guides/Mobile+Best+Practices A working link to the Tweetanium repo is here: https://github.com/appcelerator-titans/tweetanium

Titanium is still quite a young platform and unfortunately there doesn't seem to be much of a discussion about best practices. The main reference to best practices in Titanium is Tweetanium, as @bh88 states.

http://blog.krawaller.se/ is a blog from two swedish Titanium developers who are actively thinking and discussing Titanium. They've written about Tweetanium and how it influenced their style, they also write about using Coffeescript in Titanium and they've created their own framework for Titanium: http://kraniumjs.com/

Memory Leaks: Keeping the global scope clean is important to prevent memory leaks. That's why you'll see that the tweetanium project is full of self-executing functions. Appcelerator also have a couple of videos on vimeo from their Codestrong Conference, one in which Rick Bialock explains the most common mistakes that result in Memory leaks: http://vimeo.com/29804284



来源:https://stackoverflow.com/questions/4043896/what-are-the-best-practices-for-developing-applications-using-titanium-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!