-->

Should I write my app with Sencha Touch or Native?

2019-04-20 03:12发布

问题:

With the recent updates to Sencha Touch, it's looking more and more like a native app for iPhone and even iPad. There are still many differences and the documentation is a little lacking at the moment.

My question is, given that I am already fully capable of creating native app in Objective C, should I switch to Sencha Touch and PhoneGap, or start integrating those tools?

What are the pros and cons?

EDIT:

Thanks for the insightful points. One of my partners wrote up their opinion over the weekend with some ideas that haven't been mentioned here: Web vs Native: How Should You Write Your App?

回答1:

Pros:

  • Easier to port to other platforms.
  • You can distribute outside the App Store if the app doesn't require any native APIs.

Cons:

  • Scrolling still doesn't feel quite right with any of the web-based touch frameworks.
  • Slower (hardware-accelerated CSS animations help, but it's not nearly as flexible as Core Animation).
  • Lacks full access to native hardware and OS-integration (PhoneGap provides some, but not everything), such as:
    • Push notifications.
    • Local notifications.
    • Background location updates (including significant location monitoring).
  • This is debatable, but in my opinion Cocoa Touch is easier to develop in than JavaScript + Sencha/XUI/etc.


回答2:

Questions leading to your own answer:

Do you need the raw performance of a native ARM app? Or do you need an API that's only available to Objective C? (For instance, for real-time audio synthesis, etc.) Do you want to use Apple's latest APIs without waiting for some tool or library vendor?

Do you mind that your javascript source code in visible unencrypted inside every customer's .ipa file?

Or do you want to easily port a simpler app cross-platform?



回答3:

  • Pros: None
  • Cons: It will never be as native as a native app. And you depend on an API that isn't yours, eg. all your apps will be useless once they stop maintaining their API.

However, if you were unexperienced and only needed to make a App for a short event (upcoming movie promotion, etc), this would be perfect as it would save you time. But well, if you want a App with a longer lifecycle, go native.



回答4:

Forget the details of comparing these frameworks to native apps, native will always win. If your app needs to run on "multiple" platforms, then you are better off using PhoneGap and a javascript framework. These frameworks are going to take awhile to mature, so you'll have to figure out if you can get by on what they offer now. PhoneGap is also open source, so if there is something native that you want to expose, contribute to the project.