开发者

Factors to consider to choose among client-side application or web application

It seems that there are 开发者_如何学Python2 choices to develop a solution for Android platform : client-side application and web application.

According to http://developer.android.com/guide/webapps/index.html

The approach you choose for your application could depend on several factors...

But the tutorial doesn't mention what factors I should consider. May I know what is the factors I need to consider? Or in another word, what is the pros and cons of each solution?

p/s : When I talk about web application, I also mean the solution provided by http://www.phonegap.com/ as well. Seems that they able to pack HTML, JavaScript and CSS into a single package which looks like native app. (I haven't try that out)


Go native if...

  • You need capabilities that cannot be achieved such as the accelerometer
  • You need to run processes in the background, such as polling servers for updates, downloading information in the background, listening for changes made on the device
  • You need to know the orientation of the device, such as locking the user into only portrait or landscape or if you need to be alerted when this changes
  • You need to access system services such as sound manager
  • It's important to you to have a launcher icon
  • You need to do high performance stuff quickly (image editing, playing preloaded sounds, etc)
  • You need absolute control of your caching strategies for performance reasons. For example, if you need to download information from the web or preload a lot of images, you want control over this so that the browser doesn't flush this stuff without your control and then you have to make the user wait for things to download again and again
  • (via Greg's comment) You want your app to work while offline

Go web app if...

  • Your requirements are light and you want to get something up quickly that can be cross platform compatible (same app running on iPhone, etc)
  • (via Greg's comment) You don't mind that your app will always require an active network connection (will not work on the subway!)


Well the biggest is that if you build a web application, you open up your client base to the entire web, and not just someone who has an android phone.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜