开发者

Is single context the way to go for Appcelerator apps?

I am trying to decide what application paradigm to use for my iOS app build with Appcelerator. Many people talk about the Tweetanium way as the best way, i.e. single context.

I think I am going to use that but I have a few questions about it.

  1. Since I include all "windows" on the first page. Does that mean that it will have to load all windows in the application at app start?

  2. Will this paradigm really be very fast and memory conservative compared to "normal" way of for example the Kitchensink?

  3. What is the downside of using Tweetaniums way of doing things?

  4. Is it suitable for complex apps?

开发者_Python百科Thankful for all input!


Short version: Yes :)

Longer version:

Multi-context apps (like the Kitchen Sink) are also fine generally speaking, but you run into the following two problems with larger apps:

1.) Sharing data between windows/contexts within an app

2.) Unsure when the code for a given window has been run

You can also (potentially) maintain a pointer to a UI object created in one context after the window associated with that context is closed, which under some circumstances can lead your app to leak memory. Single context is easier and will ultimately get you into less trouble. Also, if your app is large, be sure to only load scripts as you need them, and not all up front.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜