01.HTML5+PHONEGAP Cross-platform Mobile Application development

Source: Internet
Author: User
<span id="Label3"></p><p class="Default"><p class="Default">first, html5+phonegap Basic Knowledge (1) HTML5 Introduction</p></p><p class="Default"><p class="Default">HTML5 is the HTML standard version that was used to replace the HTML 4.01 and XHTML 1.0 standards developed in 1999 and is still in the development stage, but most browsers already support some HTML5 Technologies. HTML 5 has two main features: first, to enhance the performance of Web Pages. second, the functionality of WEB applications such as local databases is Appended. When it comes to generalized theory and HTML5, it actually refers to a set of technical combinations including html, css, and Javascript. It wants to reduce the browser's richness of Web application services (plug-in-based Rich Internet application,ria) that require plugins, such as Adobe Flash, Microsoft Silverlight, and Oracle JavaFX needs, and provides more standard set development that can effectively enhance network applications HTML5 reasons: 1, compatibility, The old version of the browser can also run (not very reliable) 2, practical, simplified the label, broken down the function, added mobile internet elements 3, revolutionary, HTML is no longer a simple label language, adding apis, rendering and other HTML5 Features: 1. micro-data and Micro-format support, 2. Local storage, offline application 3.API call, map, location, lbs, etc. 4. Connection communication, background thread, 5. multimedia, 6. three-dimensional, Graphics and effects, 7.CSS3 (2) PhoneGap Introduction 1. What is phonegap?</p></p><p><p>PhoneGap is a fast-developing framework for creating mobile Cross-platform mobile applications using HTML,CSS and Javascript. It enables developers to take advantage of the core features of Iphone,android,palm,symbian,wp7,bada and BlackBerry smartphones-</p></p><p class="Default"><p class="Default">including geolocation, accelerators, contacts, sounds and vibrations, In addition PhoneGap has a rich plugin that can extend unlimited Functionality. PhoneGap is free, but it requires additional software from a specific platform, such as the iphone sdk,android Android SDK for iphones, and can be developed with DW5.5. Using PhoneGap is only a little bit more than building an application for each platform, because although the codebase is the same, you still need to compile the application separately for each platform. PhoneGap has expanded and encapsulated WebView for different platforms, making the WebView component a powerful browser for accessing the Device's native api, so developers can access the Device's local API via JavaScript in the PhoneGap Framework. What is WebView (the WebView component is essentially a mobile Device's built-in browser WebView This built-in browser feature is the basis for the Web to be packaged at a cost to the client, convenient to use HTML5, CSS3 page layout, which is the advantage of mobile web technology relative to native Development)</p></p><p><p>2. Advantages of PhoneGap (1) cross-platform: PhoneGap is the only one open source mobile framework that supports 7 platforms (phonegap includes geolocation, accelerators, contacts, sounds and vibrations, etc., in addition PhoneGap has a rich plug-in that can extend unlimited functionality, Almost all of the features that the native app can accomplish). Its advantages are unmatched: low development costs-up to one-fifth of native apps are estimated! (2) Ease of use, standard-based Web Development technology (html + CSS +js) (3) provides hardware access control (api) (4) that can be easily installed and used using the mature JavaScript framework (jquerymobile Senchatouch) (5) 3. PhoneGap (1) PhoneGap applications run on mobile devices on the platform of the built-in browser webkit, affected by the WebKit processing speed, as well as the hardware and software performance constraints of each platform, its programs run faster than the original program is slightly slower, But I think these problems will be solved within 1-2 years, because the development of hardware is now too fast. (2) some of the underlying functions require plug-ins for example (push Function)</p></p><p><p></p></p><p class="Default"><p class="the" "default"> (3) platform Differentiation differs, The PHONEGAP application runs on all platforms and looks the Same. Even though this app is similar to native apps, it's not customary for users who are accustomed to iOS and Android, and they'll see the difference very quickly. By comprehensively comparing the advantages and disadvantages of phonegap, we believe that if you want to quickly implement a general mobile webapp or an ordinary 2D game, you can use PhoneGap technology. If you want to achieve a large number of CPU computing applications or 3D games, or the user experience and the ultimate pursuit of interface, consider the current hardware conditions and development costs, using native development to achieve a better fit. 4. PhoneGap outlook October 4, 2011 Adobe announced the acquisition of a new company Nitobi software that created the HTML5 Mobile application framework PhoneGap and PhoneGap Build. This makes phonegap have a strong backing, phonegap development prospects is also a bright. At the same time, Phonegap's open source framework has been downloaded 600,000 times, and with the PhoneGap platform, thousands of applications have been built on ios,android and other operating Systems. Web app, Native App,hybird app Introduction (1) Web App This is mainly based on the unified standard of HTML,JAVASCRIPT.CSS and other web technology Development. Users do not need to download, through different platform browser access to achieve cross-platform, while the browser can support the full use of the HTML5 feature, The disadvantage is that these browser-based applications can not invoke the system API to achieve some advanced features, nor suitable for high-performance requirements of the Occasion. (2) The Native app is the so-called native app. refers to the application developed using a platform-specific development language. the advantage of using them is that they can take full advantage of the System's API and Platform features, and are also best in performance. The disadvantage is that because of the different development techniques, if you want to cover multiple platforms, you have to develop independently for each platform without Cross-platform Features. (3) Hybird App is to compensate for the shortcomings of the development model of the above two. inherit the advantages of both Sides. first, it allows a large number of Web developers to transform into mobile application developers at almost 0 cost, and second, the same code can be distributed on multiple platforms with only one compilation for different platforms, greatly improving the efficiency of multi-platform development, compared to the web apps, developers can invoke most of the common system APIs through a packaged Interface. PhoneGap is the Hybird App's Representative Development Framework </p></p><p class="Default"><p class="Default">three, to learn PhoneGap</p></p><p class="Default"><p class="Default"></p></p><p class="Default"><p class="Default">1, Mobile Internet Software development status in the interests of multi-vendor competition, the current intelligent Terminal Platform presents a "contention" Phenomenon. The current mobile terminal system presents a more fragmented state, in which Nokia's main Twitter Symbian, Apple's ios, and Google's Android, respectively, occupy a larger market share. however, due to the incompatibility between the current mainstream mobile platforms, there is currently no compatible application development interface and language for different mobile platform systems, and currently, Symbian using C + +, iOS with Object C and Android app development technology using Java It's almost completely impossible to Fuse. 2, the development of mobile Internet software developers after the development of Android applications, but also to re-develop iOS applications, the development of iOS will have to develop Windows Phone, a different platform for the application of repeated development 1. from the perspective of application development, The same program logic has to be repeated on multiple platforms using different languages and Apis. 2. From the point of view of code maintenance, it is necessary to maintain multiple copies of code for the same project, which will result in large-scale code modification and regression testing once the program logic Changes. 3. From an economic standpoint, the development and maintenance of multiple platform applications at the same time will cost the enterprise enormous human and time Costs. 3, the emergence of phonegap, why to learn PhoneGap</p></p><p class="Default"><p class="Default">To solve these problems, cross-platform mobile application development technology has gradually attracted the attention of Developers. There are also a lot of cross-platform framework, but I think the better part of PhoneGap is also the most developers of the four, HTML5 Mobile application software Development Framework Jquerymobile Senchatouch Introduction 1.JqueryMobile</p></p><p class="Default"><p class="Default">jquery Mobile is a version of jquery on mobile phones and tablet devices. jquery Mobile Not only brings the jquery core library to the mainstream mobile platform, but also publishes a complete unified jquery Mobile UI Framework. Support the global mainstream mobile platform. This framework is easy to Use. Page development uses tags primarily, with little or no JavaScript required. This framework is easy to Use. Page development uses tags primarily, with little or no JavaScript required. 2.SenchaTouch introduced shortly before the AJAX framework ExtJS based on javascript, the existing ExtJS integration jqtouch, rapha&euml;l library, The introduction of the most advanced touch Web Sencha Touch framework, The World's first HTML5-based mobile app Framework. meanwhile, ExtJS renamed Sencha,jqtouch's founder David Kaneda, and Rapha&euml;l's founder has also joined the Sencha team 3.JqueryMobile Senchatouch Contrast You can take a look at this article with detailed instructions</p></p><p class="Default"><p class="Default">http://www.phonegap100.com/article-65-1.html jquery Mobile JM is just a UI library that relies on the DOM operations of jquery and jquery uis, Ajax, and other libraries</p></p><p class="Default"><p class="Default">o in order to create UI widgets, you only need to write html, JM, in order to decorate these HTML elements</p></p><p class="Default"><p class="Default">o Easy to reuse existing HTML code</p></p><p class="Default"><p class="Default">o Some simple applications can be implemented directly with HTML, without JavaScript</p></p><p class="Default"><p class="Default">O JM has a relatively small object model that can be quickly and easily learned, especially if he is a jQuery plugin</p></p><p class="Default"><p class="Default">o JM does not have specific requirements for the code, which may be very flexible, but also more difficult to maintain</p></p><p class="Default"><p class="Default">o Easy to set with other frameworks</p></p><p class="Default"><p class="Default">o More devices than Sencha Touch support</p></p><p class="Default"><p class="Default">o do not rely on a particular vendor</p></p><p class="Default"><p class="Default"></p></p><p class="Default"><p class="Default">Sencha Touch</p></p><p class="Default"><p class="Default">o This is a stand-alone library that includes UI widgets, DOM operations, Ajax, and other</p></p><p class="Default"><p class="Default">o No dependencies on other libraries</p></p><p class="Default"><p class="Default">o using a JavaScript-centric approach that basically does not need to write HTML</p></p><p class="Default"><p class="Default">O provides a large object model that provides more functionality, but the learning cycle is long</p></p><p class="Default"><p class="Default">O Unified programming code structure and requirements, good organization of code easy to maintain</p></p><p class="Default"><p class="Default">O provides a built-in abstraction layer of servers and local storage that can easily perform CRUD operations based on relational Data.</p></p><p class="Default"><p class="Default">o provides built-in tools for creating programs that run locally on IOS and Android</p></p><p class="Default"><p class="Default">o Less devices supported than JQuery Mobile</p></p><p class="Default"><p class="Default"></p></p><p class="Default"><p class="Default">Create a simple example, packaged as a cross-platform installable mobile app</p></p> <table border="1" cellspacing="0" cellpadding="0"> <tbody> <tr> <td valign="top" width="348"><p class="Default">A Simple example of environment building <! doctypehtml>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.