Which language is better for a stock market-related iPhone app — JavaScript or Objective-C?
If I want to make an application f开发者_Go百科or the iPhone that’s related to the stock market, should I use JavaScript or 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.
You could also consider MonoTouch if you're familiar with the .NET stack and C# already.
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.
精彩评论