Three advantages and disadvantages of HTML5 mobile application with jquery mobile

Source: Internet
Author: User

For about one months, I have been using jquery Mobile to develop HTML5-based mobile/tablet front-end applications for a fitness training website. I've written about Android and iOS apps (in Java and objective-c, respectively), so it's tempting to write a piece of code that runs on a mainstream platform and can iterate quickly with HTML and JavaScript.

JQuery Mobile & HTML5

Using HTML5 and Javasript to build a mobile app, you need to write a lot of JavaScript code. However, the UI control and processing of a device with a touchscreen is very different from a standard Web application. Therefore, you will want to use the ready-made mobile phone Html5/javascrip framework (unless you have a lot of time and plan to rebuild everything). Now there are a lot of ready-made frameworks to choose from: JQTouch, Sencha Touch, and more.

I've been a fan of jquery for years, and I've been particularly appreciative of its philosophy of minimalism and its core features and plugins and community contributions. It was because of jquery that I was able to accept development using JavaScript. So, when I heard the good news about jquery from Chris McDonough (the author of the Pyramid Python Web framework), I knew I should try.

3 Benefits of JQuery Mobile and HTML5

1. get started quickly and support fast iterations: In a little over one weeks, by reading the jquery mobile document and the jquery Mobile book published by O ' Reilly, I completed a preliminary version of the app that works. Prior to this I did not have html5/jquery mobile development experience. Using jquery Mobile and HTML5 to build your UI and logic is much faster than Android and iOS to build on your native system.

Native System: The original operating system, such as the Android native system, is Google's release of the unmodified system. In this article, the native application refers to a program developed directly from a system-provided API that corresponds to a program developed by jquery Mobile.

I found that the learning curve of Apple's builder interface was steep, and it was also time-consuming to learn the puzzling Android layout system. In addition, to use native code to connect a list view to a remote data source and have a nice look is very complex (on Android is a ListView, UITableView on iOS) I was able to get through the JavaScript and html/already mastered CSS knowledge quickly implements the same functionality without the need to learn the abstractions of new adapter,delegate and so on, as long as you write jquery code.

2. avoid the hassle of the app Store approval process and the pain of debugging and building: developing apps for mobile phones, especially for iOS, is the most painful process through the Apple App Store approvals. To make a native app available to iOS users, you'll need to wait for a fairly long process (several days, maybe even weeks). Not only will you experience the ordeal when you publish your program for the first time, but every time you upgrade. This complicates the QA and publishing processes and adds additional time. Because the jquery mobile application is just a Web application, it inherits the benefits of all Web environments: When users load your site, they "upgrade" to the latest version right away. You can fix bugs and add new features right away. Even in Android-the application market is much looser than the apple environment, it's a good thing that users unknowingly complete a product upgrade.

The further benefit is that it is easier to release beta or beta versions. Just tell the user to open your URL with a browser! No need to think about iOS's maddening DRM or the APK that Android must have.

3. support for cross-platform and cross-device development: One great benefit is that my app can work on Android and iOS right away, as well as on other platforms. As an independent developer, maintaining the underlying code for different platforms is a huge effort. Writing high-quality mobile apps for a single phone platform requires full-time work, and repeating similar things for each platform requires a lot of resources. It's a huge benefit to me that the app works on both Android and iOS devices.

Further, especially for devices that run various branches of Android, they vary in size and shape, and it's a real challenge to want your app to look good on phones with a wide range of screen resolutions. For demanding Android developers, it takes a lot of development time to set up screen segmentation (from completely minimized to maximum) for the screen size. Since browsers are presented in the same way on every device, you don't have to worry about this.

3 drawbacks of JQuery Mobile and HTML5

1. slower than the native program: In my opinion the biggest drawback is that, even on the latest Android and iOS hardware (dual-core Tegra 2 Android phones, dual-core iPad2 tablet), the JQuery mobile app will be significantly slower

In the native program. Especially on Android, browsers are slower and more bug-prone than iOS (although Google is a web-focused company). I didn't test my program on an earlier Android device, and maybe I couldn't run it at all (for example, Android G1). I believe that in the next six to 12-24 months, the hardware speed will be improved quickly (for example, four-core equipment will be available in 2011), performance may soon not become a problem. But today, it is indeed a drawback. If you only focus on iOS, you can look forward to the performance of the browser, at least it is reliable in this respect (unlike Android, BlackBerry, etc.)

2. Quirky (cross-browser, cross-platform development): JQuery Mobile is still a beta version, so I'm having a lot of bugs. In other words, the jquery team is actively responding to questions raised on GitHub. I think one of the biggest problems is the quirky performance of various browsers on different mobile platforms. This question has been criticized for a long time. The application may seem odd-although I think the jquery mobile team is doing a great job on widgets and themes, but it does look significantly different from the native program. It is unclear how much this problem will affect users, but this needs to be noticed.

3. Limited Ability vs. Native program: It is clear that JavaScript running on the browser does not have full access to many features of the device. A typical example is the camera. However, tools like phonegap can help solve many common problems. In fact, I've started to deploy several versions of my application via PhoneGap to iOS and Android, using the native Facebook bindings, and the effect has impressed me a great image. I will write some experience of using phonegap in the future blog.

Summarize

Overall, I think it's possible to use jquery mobile and HTML5 as a platform for mobile application development. However, this does not apply to all types of applications (at least until now). For simple content display and data entry type applications (relative to the need for rich multimedia/game programs), it is a powerful enhancement to the native program. I am happy with the results of my application using the new platform-no longer need to maintain my fitness tracking software for both Android and iOS.

Over the next 1-2 years, as hardware has become faster and more diverse, I believe HTML5 (JQuery Mobile, PHONEGAP, etc.) will be a more important technology in mobile application development.

Three advantages and disadvantages of HTML5 mobile application with jquery mobile

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.