iPhone: What are the Advantages and Disadvantages of Developing with CSS/Javascript?
There are alternatives to developing for iPhone besides the native Objective-C API. In particular, there are CSS/Javascript based solutions such as the iUi Framework.
Can you write successful iPhone apps with CSS/Javascript? Does Apple approve such apps? What are the advantages and disadvantages of using t开发者_如何学JAVAhis approuch?
Thanks in advance.
(1) You can write successful apps with CSS/Javascript. The first generation of iPhone apps were all CSS/Javascript.
(2) Apple routinely approves such apps.
(3) The advantages are that you can leverage your existing knowledge of CSS/Javascript to write apps without having to learn a new language and a new API. The disadvantage is that such apps are not as fast, flexible and powerful as compiled apps. It is exactly the same situation as on a non-mobile platform. Webapps do not compare to apps written with the system specific API.
However, in some cases they can be almost as good. For example, if the main purpose of your app is to interact with a specific web site, then a CSS/Javascript app will probably perform just as well as a compiled one.
There's not really any question as to the "best way". There's just a way; that is, using UIKit and Obj-C, with OpenGL ES for games.
There are some other approaches, but they are generally, well, not so good. Developing applications for the iPhone using CSS/JS is a bit half-assed; but doesn't really require apple approval; seeing as how they are just web apps.
精彩评论