简体   繁体   中英

Which language is better for a stock market-related iPhone app — JavaScript or Objective-C?

如果我想为与股票市场相关的iPhone申请,我应该使用JavaScript还是Objective-C?

JS targets websites / web applications. Objective-C is for native apps.

You could build a very simple native app as a wrapper with a WebView for a JS-based website but this is discouraged.

So different languages for different targets. No real choice here.

Objective C will give you more flexibility and capability. The iOS audience is very discerning - most of your users will know the difference between a native application written for the iOS platform versus a "Web app" written more generically. A native application is usually more appreciated than a generic one.

That said, going with Web technologies will make it easier to address wider audiences later, like for other platforms like Android or upcoming Windows phone, again in a generic way.

If you have the budget and a long term vision, I recommend that you "go native" - build your app in Objective C.

If you mean using JavaScript to create touch aware web applications (perhaps embedded in an thin application that's mearly a UIWebView wrapper) versus creating native applications in Objective-C, then it's a pretty simple choice. Native applications will always be considerably richer than any UIWebView based app, as the UIKit provides a wide array of UI capabilities which would be difficult to implement in HTML (5 or otherwise) and even then wouldn't have the same degree of polish.

That said, there's no way (yet?) to create native applications in JavaScript.

如果您已经熟悉.NET堆栈和C#,也可以考虑使用MonoTouch。

The PhoneGap project has made significant strides in allowing one to write native-feeling cross-platform Javascript applications that still provide access to native APIs.

If you are interested or experienced with Javascript and if your project is not graphics-intensive (like a game, which I assume it isn't from your description) I would suggest checking out phonegap. You also gain an easy outlet for targeting Android and other platforms at the same time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM