PhoneGap-技术可行性分析毕业论文.doc

上传人:知****量 文档编号:91600488 上传时间:2023-05-27 格式:DOC 页数:12 大小:93.50KB
返回 下载 相关 举报
PhoneGap-技术可行性分析毕业论文.doc_第1页
第1页 / 共12页
PhoneGap-技术可行性分析毕业论文.doc_第2页
第2页 / 共12页
点击查看更多>>
资源描述

《PhoneGap-技术可行性分析毕业论文.doc》由会员分享,可在线阅读,更多相关《PhoneGap-技术可行性分析毕业论文.doc(12页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。

1、PhoneGap 技术可行性分析 1 移动应用现状移动应用产品往往常常考虑多个平台的支持.单一平台很难保证应用的覆盖面或者换句话说就是用户群体的量和持续的活跃性上从长期的角度而言往往存在短板.另外从开发的角度而言.多平台的支持往往需要建立不同的技术团队.而平台之间开发技术也是完全迥异的.开发一个具有相同业务的应用需要使用到不同平台的框架和开发语言.使用C/C+的Symbian、使用Object C的iOS和使用Java的Android应用开发技术,几乎是完全无法融合的. PhoneGap跨平台移动应用开发框架正是应运而生.我们需要搞清楚几个概念:Web App,Native App,Hybir

2、d App移动平台Application几个概念:Web App:这个主要是采用统一的标准的HTML,JavaScript.CSS等web技术开发.通过不同平台的浏览器访问来实现跨平台.同时可以通过浏览器支持充分使用HTML5特性,缺点是这些基于浏览器的应用无法调用系统API来实现一些高级功能,也不适合高性能要求的场合。Native App:就是所谓的原生应用.指的是用平台特定的开发语言所开发的应用.使用它们的优点是可以完全利用系统的API和平台特性,在性能上也是最好的。缺点是由于开发技术不同,如果你要覆盖多个平台,则要针对每个平台独立开发,无跨平台特性。Hybird App:则是为了弥补如上

3、两者开发模式的缺陷的产物.分别继承双方的优势.首先它让为数众多的web开发人员可以几乎零成本的转型成移动应用开发者;其次,相同的代码只需针对不同平台进行编译就能实现在多平台的分发,大大提高了多平台开发的效率;而相较于web App,开发者可以通过包装好的接口,调用大部分常用的系统API。而PhoneGap正是Hybird APP目前框架中集大成者。2 phonegap简介phoneGap是Nitobi开发的一个免费开源的开发框架,目前最新版本是1.5,用来构建跨平台的使用HTML,CSS和JavaScript的应用程序。以written once, run everywhere一次编译到处运行

4、而受欢迎,只需要改动少量代码而实现跨平台。phonegap简单来说是一个中间件,为移动前端提供访问移动终端设备及资源的接口。采用统一的标准的html、javascript、css等web技术开发.通过不同平台的浏览器访问来实现跨平台。通过javascript脚步代码调用系统资源,以降低开发难度,所以受到广大web开发人员的青睐。2011年10月4日Adobe宣布收购了创建了HTML5移动应用框架PhoneGap和PhoneGap Build的新创公司Nitobi Software。这使得phonegap有了坚强的后盾,phonegap的发展前景也是一片光明。与此同时,PhoneGap的开源框架

5、已经被累积下载60万次,借助PhoneGap平台,已有数千应用程序建立在iOS,android以及其它操作系统之上。3 phonegap技术要求Adobe dreamweaver 5.5版本为phonegap提供了优越的开发环境。开发人员可以使用dreamweaver 5.5开发android app。虽然phonegap门槛较低,但是也要求开发人员具备必要的技能。要求开发人员掌握html、css、javascript技术,特别要求javascript技术,在javascript基础上需要掌握jQuery mobil框架ajax通讯技术。4 phonegap优缺点评估日前,phonegap框架

6、热度如火如荼。一项技术当然会有其优缺点,我们是选用phonegap还是选择Native APP,要先分析两者的利弊,再根据具体应用选择。phonegap优点:(1)可跨平台性能。phonegap作为跨平台框架,其实并别written once, run everywhere,各移动平台的差异还是较大,phonegap框架帮我们解决了差异性,javascript与平台系统的连接由phonegap框架完成。成为连接移动终端的适配器,或者说中间件。PhoneGap通过调用JavaSCript调用API库实现和各个平台的SDK进行无差别的交互.以达到调用不同平台手机上摄像头,文件系统,重力感应.GPS

7、定位等功能。(2)易用性。phonegap开发人员无需直接操作平台资源。对平台资源的操作完成由phonegap框架完成。开发人员只需要用javascript调用phonegap API就可以完成对平台资源操作。由于phonegap框架限制,对平台资源操作是有一定限制的。phonegap开发人员可以从web开发人员转入,目前来说web开发人员较多,成本也较低,转入phonegap开发后,可以降低移动应用产品的开发成本。这样,移动应用数量将直线提升。(3)提供硬件访问控制。比起传统的Web程序,PhoneGap提供了一些列的JS的类,可以直接访问硬件。比如加速,相机,指南针,GPS,文件访问等,可

8、以让你用JS方便地调用系统的硬件。以弥补传统Web程序的一块错误。(4)可以利用成熟javascript框架。Web的发展,诞生了许多javascript框架。著名的有Ext js、jQuery。随着移动应用的需求越来越大,jQuery出现了jQuery mobile版本。它的体积小,为移动应用量身定制。使用javascript框架也降低了开发难度,使得移动应用更美观。(5)方便的安装和使用。PhoneGap的架构很复杂,但对于大多数开发者来说,并不需要了解phonegap内部,只用很简单的配置就可以搭好环境。只用专注写好自己的Web页面,拷贝进去就可以了。phonegap不足之处:(1)运行

9、速度慢。PhoneGap集成多了个平台.程序的载入和UI界面的反应都比原生的程序慢,UI反应延时这是个致命伤。它实际上还是在展示Web页面,所以载入、页面刷新等肯定是需要一定时间的。在用户体验上phonegap依然无法替代原生应用程序。另外html、javascript、css都运行在各平台内置浏览器webkit之上,受到webkit处理速度影响。目前来说运行速度比较慢,性能较差。(2)不适合部分程序。如果你的程序需要3D功能,或者对界面刷新有较高的要求,比如类似于游戏的程序现在来说还只是用原生的语言会比较好。PhoneGap支持API还有待在各个平台逐步完善。(3)调用平台资源差。phone

10、gap应用程序对平台资源的使用依赖于phonegap框架本身,由于phonegap是第三方框架,做不到100%调用平台资源,只有依靠phonegap的升级满足调用平台资源的需求。(4)内存消耗大。有测试表明,用phonegap于android java开发同一个应用。运行phonegap应用内存消耗远大于原生态android java应用。对于频繁操作,释放内存较慢,从而导致内存消耗量飙升。(5)调用难度大。目前phonegap可以在控制台输出简单的JS调试日志,但是并不方便。调试js只能选择firefox的firebug调试。此次对比主要集中在对大量数据通信下web app UI性能。通过与

11、android Java app相比较,web app的UI性能会比Java app的UI性能差。主要原因是依赖webkit浏览器内核的渲染解析能力。同时在只有一个WebView的情况下,如何控制内存的上涨速度以无法释放内存的情况无缝地重新启动WebView从而不影响用户体验,是一个现实待解决问题。在非大数据量且不需要频繁更新UI的情况下,基于wekit浏览器phonegap模式还是可以满足Android开发应用的需求。同时应用的实现的效率还依赖于OPOA开发模式的Javascript基础架构是否强大和高效。对于不同分辨率的屏幕,需要通过JS或者通过要集成的框架封装来解决适配的问题。同时由于不

12、同版本的Android所集成的webkit的版本不同,同样也需要处理不同版本的在JavaScript和CSS支持上不同的兼容性问题。还有解决开发时多人协作及方便的调试工具集成,也是进行html5 app开发的重要前提条件。或者通过要集成的框架封装来解决适配的问题。同时由于不同版本的Android的版本不同,同样也需要处理不同版本的在JavaScript支持上不同的兼容性问题。还有解决开发时多人协作及方便的调试工具集成,也是进行html5 app开发的重要前提条件。5 结论phonegap的目标就是快速开发移动应用实现written once, run everywhere跨平台。phonega

13、p一定程度上降低了移动开发的门槛,特别是ios开发。传统web开发人员不需要学习object-c、android java就可以开发普通的移动应用。类似于phonegap这样的框架的出现,并不能取代Native APP原生态应用。phonegap有它的不足之处,运行速度较慢、操作平台资源不灵活、操作移动设备不方便,这些都依赖者phonegap框架本身的升级与发展。不过值得高兴的是adobe公司收购了phonegap开发商,增加了phonegap的后台实力。phonegap的种种不足之处表明Native app的地区不能被取代,只能说会瓜分一部分简单web移动应用。在用户体验方面。phonega

14、p运行速度相对慢,页面动画切换有点卡,这影响着用户体验。这些原因能否解决,这取结于移动平台的webkit的性能优化和对html、css、javascript的支持程度。在硬件支持与内存方面。一个应用用两种方式实现,native app消耗内存较低,要求硬件支持较低。phonegap消耗内存较大,内存释放效率较低,因而要求的硬件支持相比之下就高了。开发费用方面。phonegap要求开发人员的javascript、css技术高,甚至要求开发人员掌握html5新技术。这样开发人员费用高于传统web开发人员。不过,与native app相比,phonegap可以实现跨平台,减少在各个平台上花费开发费用

15、。总体上,一个移动产品采用phonegap,费用要低些。至于是否采用phonegap于native app方式,这要取决于移动产品本身特性与企业对产品的要求。一般的移动web应用可以采用phonegap技术,但是用户体验就没有native app好;接近于游戏的应用,经常刷新界面的应用,使用phonegap就不太合适了。最后,采用何种技术,要看产品的侧重点。像QQ这样的应用,注重用户体验,应该不会采用phonegap了。附录B 英文原文 PhoneGap Technical Feasibility Analysis1 Mobile Application StatusMobile applic

16、ations 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 long-term perspective there is often a short board. In addition, from the development of perspective, mu

17、lti-platform 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 O

18、bject C for iOS and Android application development using Java technology, is almost completely unable to fusion. PhoneGap cross-platform mobile application development framework was born.We need to figure out a few concepts: Web App, Native App, Hybird App Mobile Platform Application several concep

19、ts:Web App:This is mainly a unified standard HTML, JavaScript.CSS other web technologies developed through the browser to access the different platforms to achieve cross-platform, while you can use the browser to support the full HTML5 features, the disadvantage is that these browser-based applicati

20、ons do not call the system API to implement some of the advanced features, not suitable for high-performance requirements of the occasion.Native App:The so-called native application refers to the use of platform-specific application development language developed by using the advantage that they can

21、 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 cross-platform features.Hybird App:As if to compensate f

22、or 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 compiler platform can be achieved in a multi-p

23、latform distribution, greatly improving the efficiency of multi-platform development; rather than web App, developers can package a good interface most commonly used system call API.The PhoneGap framework is Hybird APP currently synthesizer.2 Introduction phonegapphoneGap is Nitobi developed a free

24、open-source development framework, the latest version is 1.5, used to build cross-platform using HTML, CSS and JavaScript applications. In written once, run everywhere compile once, run everywhere and welcome, you only need a small amount of code changes to be realizedCross-platform.phonegap simply

25、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 cross-platform. Footsteps

26、 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 Build-ups Nitobi Software. This makes phonegap With strong

27、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 dreamw

28、eaver 5.5 version phonegap provide a superior development environment. Developers can use dreamweaver 5.5 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 techno

29、logy requires javascript, based on the need to master in javascript framework jQuery mobil ajax communications technology.4 Phonegap Assess the advantages and disadvantagesRecently, phonegap frame heat in full swing. A technical course, have its advantages and disadvantages, we chose to use phonegap

30、 Native APP, first analyze the pros and cons of both, according to the specific application selection.phonegap advantages:(1) cross-platform performance. phonegap as a cross-platform framework, in fact, not written once, run everywhere, each mobile platform differences or larger, phonegap framework

31、to help us solve differences, javascript connection with the platform system completed by the phonegap framework. A mobile terminal connected to the adapter, or middleware. PhoneGap API calls by calling JavaSCript library implementation of the SDK for each platform and undifferentiated interact in o

32、rder to achieve different platforms to call on the phone camera, file system, gravity sensor. GPS positioning and other functions(2) ease of use. phonegap developer without direct manipulation of platform resources. Resources to complete the operation on the platform by the phonegap framework is com

33、pleted. Developers only need javascript call phonegap API can be completed on platform resources operations. Since phonegap framework restrictions on the operation of platform resources there is a certain limit. phonegap developers can turn from a web developer, web developer at present more costs a

34、re lower, into phonegap developer, you can reduce the cost of product development of mobile applications. Thus, the number of mobile applications will be a straight line upgrade.(3) provides hardware access control. Compared to traditional Web applications, PhoneGap provides some columns JS class, y

35、ou can directly access the hardware. Such as acceleration, camera, compass, GPS, file access, etc., allows you to use JS to easily call the systems hardware. To compensate for a traditional Web application error.(4) can take advantage of sophisticated javascript framework. Web development, the birth

36、 of many javascript framework. Notably Ext js, jQuery. With the growing demand for mobile applications, jQuery appeared jQuery mobile version. Its small size, tailored for mobile applications. Using javascript framework also reduces the development effort, making mobile applications more attractive.

37、(5) easy to install and use. PhoneGap framework is very complex, but for most developers do not need to know phonegap inside, using only a very simple configuration can be setting up the environment. Written using only focus on your own Web pages, copy into it.phonegap inadequacies:(1)running slow.

38、PhoneGap integration more than a platform for program loading and UI interface reactions slower than the native program, UI response delay this is a fatal wound. It is actually a Web page or in the show, so loaded, the page refreshes and so definitely take some time. The user experience is still no

39、substitute for phonegap native applications. In addition html, javascript, css run on various platforms built on top of the browser webkit by webkit processing speed impact. Currently it runs slow, poor performance.(2) is not suitable for some of the procedures. If your program requires 3D features,

40、 or refresh of the interface have higher requirements, such as a program similar to the game for now just use the native language would be better. PhoneGap API also supports various platforms and gradually perfect stay.(3) poor call platform resources. phonegap application resource usage of the plat

41、form depends on the phonegap framework itself, since phonegap third-party framework, can not do 100% call platform resources, and only rely phonegap upgrade platform resources to meet the needs of call.(4) memory consumption. A test showed that, with phonegap in android java developer with an applic

42、ation. Run phonegap application memory consumption is much larger than the original ecological android java application. For frequent operation, freeing memory is slow, resulting in memory consumption soared.(5) Call difficult. Currently phonegap in the console output simple JS debug log, but not co

43、nvenient. Js debugging only choose the firebug firefox debugging.The comparison focuses on large amounts of data communications under web app UI performance. By comparison with the android Java app, web apps UI performance than the Java apps UI poor performance. Mainly dependent on webkit browser co

44、re rendering analytic capabilities. WebView while only a case of how to control the rise in the speed of memory in the case of the memory can not be released to restart WebView seamlessly so as not to affect the user experience, is a real problem to be solved.And the large amount of data in a non-fr

45、equent need to update the UI case, based on wekit browser phonegap mode or to meet the demand for Android application development. Applied Simultaneously achieve efficiency also depends on the development model OPOA Javascript infrastructure is robust and efficient.For different screen resolutions,

46、the need to be integrated or by JS frame package adapted to solve the problem. And because different versions of the Android version of the integrated webkit different, also need to deal with different versions of JavaScript and CSS support in different compatibility issues. When there are more coll

47、aborative solution development and debugging tools to facilitate integration, but also for html5 app development an important prerequisite.Or through a framework to integrate adaptation package to solve the problem. And because different versions of the Android version, also need to deal with differ

48、ent versions of the JavaScript support on various compatibility issues. When there are more collaborative solution development and debugging tools to facilitate integration, but also for html5 app development an important prerequisite.5 Conclusionphonegap goal is to achieve rapid development of mobi

49、le applications written once, run everywhere across platforms. phonegap certain extent, reduce the threshold of mobile development, especially ios development. Traditional web developers need to learn object-c, android java can develop common mobile applications.Similar to the emergence of such a framework phonegap, does not replace the original Native APP Ecological Applications. phonegap

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 教育专区 > 教案示例

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号© 2020-2023 www.taowenge.com 淘文阁