【正文】
慢,性能較差。(2)不適合部分程序。如果你的程序需要3D功能,或者對界面刷新有較高的要求,比如類似于游戲的程序現(xiàn)在來說還只是用原生的語言會比較好。PhoneGap支持API還有待在各個平臺逐步完善。(3)調(diào)用平臺資源差。phonegap應(yīng)用程序?qū)ζ脚_資源的使用依賴于phonegap框架本身,由于phonegap是第三方框架,做不到100%調(diào)用平臺資源,只有依靠phonegap的升級滿足調(diào)用平臺資源的需求。(4)內(nèi)存消耗大。有測試表明,用phonegap于android java開發(fā)同一個應(yīng)用。運行phonegap應(yīng)用內(nèi)存消耗遠大于原生態(tài)android java應(yīng)用。對于頻繁操作,釋放內(nèi)存較慢,從而導致內(nèi)存消耗量飆升。(5)調(diào)用難度大。目前phonegap可以在控制臺輸出簡單的JS調(diào)試日志,但是并不方便。調(diào)試js只能選擇firefox的firebug調(diào)試。此次對比主要集中在對大量數(shù)據(jù)通信下web app UI性能。通過與android Java app相比較,web app的UI性能會比Java app的UI性能差。主要原因是依賴webkit瀏覽器內(nèi)核的渲染解析能力。同時在只有一個WebView的情況下,如何控制內(nèi)存的上漲速度以無法釋放內(nèi)存的情況無縫地重新啟動WebView從而不影響用戶體驗,是一個現(xiàn)實待解決問題。在非大數(shù)據(jù)量且不需要頻繁更新UI的情況下,基于wekit瀏覽器phonegap模式還是可以滿足Android開發(fā)應(yīng)用的需求。同時應(yīng)用的實現(xiàn)的效率還依賴于OPOA開發(fā)模式的Javascript基礎(chǔ)架構(gòu)是否強大和高效。對于不同分辨率的屏幕,需要通過JS或者通過要集成的框架封裝來解決適配的問題。同時由于不同版本的Android所集成的webkit的版本不同,同樣也需要處理不同版本的在JavaScript和CSS支持上不同的兼容性問題。還有解決開發(fā)時多人協(xié)作及方便的調(diào)試工具集成,也是進行html5 app開發(fā)的重要前提條件。或者通過要集成的框架封裝來解決適配的問題。同時由于不同版本的Android的版本不同,同樣也需要處理不同版本的在JavaScript支持上不同的兼容性問題。還有解決開發(fā)時多人協(xié)作及方便的調(diào)試工具集成,也是進行html5 app開發(fā)的重要前提條件。5 結(jié)論phonegap的目標就是快速開發(fā)移動應(yīng)用實現(xiàn)written once, run everywhere跨平臺。phonegap一定程度上降低了移動開發(fā)的門檻,特別是ios開發(fā)。傳統(tǒng)web開發(fā)人員不需要學習objectc、android java就可以開發(fā)普通的移動應(yīng)用。類似于phonegap這樣的框架的出現(xiàn),并不能取代Native APP原生態(tài)應(yīng)用。phonegap有它的不足之處,運行速度較慢、操作平臺資源不靈活、操作移動設(shè)備不方便,這些都依賴者phonegap框架本身的升級與發(fā)展。不過值得高興的是adobe公司收購了phonegap開發(fā)商,增加了phonegap的后臺實力。phonegap的種種不足之處表明Native app的地區(qū)不能被取代,只能說會瓜分一部分簡單web移動應(yīng)用。在用戶體驗方面。phonegap運行速度相對慢,頁面動畫切換有點卡,這影響著用戶體驗。這些原因能否解決,這取結(jié)于移動平臺的webkit的性能優(yōu)化和對html、css、javascript的支持程度。在硬件支持與內(nèi)存方面。一個應(yīng)用用兩種方式實現(xiàn),native app消耗內(nèi)存較低,要求硬件支持較低。phonegap消耗內(nèi)存較大,內(nèi)存釋放效率較低,因而要求的硬件支持相比之下就高了。開發(fā)費用方面。phonegap要求開發(fā)人員的javascript、css技術(shù)高,甚至要求開發(fā)人員掌握html5新技術(shù)。這樣開發(fā)人員費用高于傳統(tǒng)web開發(fā)人員。不過,與native app相比,phonegap可以實現(xiàn)跨平臺,減少在各個平臺上花費開發(fā)費用??傮w上,一個移動產(chǎn)品采用phonegap,費用要低些。至于是否采用phonegap于native app方式,這要取決于移動產(chǎn)品本身特性與企業(yè)對產(chǎn)品的要求。一般的移動web應(yīng)用可以采用phonegap技術(shù),但是用戶體驗就沒有native app好;接近于游戲的應(yīng)用,經(jīng)常刷新界面的應(yīng)用,使用phonegap就不太合適了。最后,采用何種技術(shù),要看產(chǎn)品的側(cè)重點。像這樣的應(yīng)用,注重用戶體驗,應(yīng)該不會采用phonegap了。附錄B 英文原文 PhoneGap Technical Feasibility Analysis1 Mobile Application StatusMobile applications often tend to consider a number of platforms. Single platform application is difficult to ensure the coverage of user groups or in other words, the amount and duration of activity from the longterm perspective there is often a short board. In addition, from the development of perspective, multiplatform support is often needed to establish different technical teams, while the development of technology platforms is totally different. developing an application with the same business need to use the framework to different platforms and development languages ??using C/C++ for Symbian, using Object C for iOS and Android application development using Java technology, is almost pletely unable to fusion. PhoneGap crossplatform mobile application development framework was born.We need to figure out a few concepts: Web App, Native App, Hybird App Mobile Platform Application several concepts:Web App:This is mainly a unified standard HTML, other web technologies developed through the browser to access the different platforms to achieve crossplatform, while you can use the browser to support the full HTML5 features, the disadvantage is that these browserbased applications do not call the system API to implement some of the advanced features, not suitable for highperformance requirements of the occasion.Native App: The socalled native application refers to the use of platformspecific application development language developed by using the advantage that they can be fully use the system API and platform features, the performance is the best. Drawback is due to the development of different technologies, if you want to overwrite multiple platforms, they have developed independently for each platform, no crossplatform features. Hybird App:As if to pensate for the deficiencies of both product development model. Inherit the advantages of both sides. First, it allows a large number of web developers can transition into almost zero cost mobile application developers。 secondly, just the same code for different piler platform can be achieved in a multiplatform distribution, greatly improving the efficiency of multiplatform development。 rather than web App, developers can package a good interface most monly used system call API.The PhoneGap framework is Hybird APP currently synthesizer.2 Introduction phonegapphoneGap is Nitobi developed a free opensource development framework, the latest version is , used to build crossplatform using HTML, CSS and JavaScript applications. In written once, run everywhere pile once, run everywhere and wele, you only need a small amount of code changes to be realizedCrossplatform.phonegap simply is a middleware for the mobile front end provides access to the mobile terminal equipment and the resources of the interface. Adopt a unified standard html, javascript, css and other web technologies developed through the browser to access the different platforms to achieve crossplatform. Footsteps via javascript code to call system resources to reduce development effort, so by the majority of web developers of all ages.October 4, 2011 Adobe announced the acquisition of mobile application framework created HTML5 and PhoneGap PhoneGap Buildups Nitobi Software. This makes phonegap With strong backing, phonegap prospects are also bright. At the same time, PhoneGap open source framework has been downloaded 600,000 times accumulated, with the PhoneGap platform, there are thousands of applications built on iOS, android and other operating systems.3 Phonegap Technical RequirementsAdobe dreamweaver version phonegap provide a superior development environment. Developers can use dreamweaver develop android app. Although phonegap lower threshold, but also requires developers to have the necessary skills.Require developers to master html, css, javascript technology, especially technology requires javascript, based on the need to master in javascript framework jQuery mobil ajax munications technology.4 Phonegap Assess the