简体   繁体   中英

Which technology should I use for a mobile web app: HTML5 or jQuery Mobile?

I have been assigned to build a mobile web application. I have found two ways to develop that (there might be hundred other ways to do that, but I am aware of these two): jQuery Mobile and HTML 5.

Which one should I use? The application will be a normal web app, like a shopping web app or a user management system.

I am looking for compatibility in different phones and great UI with fast processing.

So, the ways I know is JQuery mobile and HTML 5.

Which one should I use?

It's not a case of using one or the other - you use both to create a solution.

HTML5 provides the framework to present your content, whether it is text, images, video, audio, or any mixture of the above.

jQuery (Original or Mobile) is used for "Progressive Enhancement", that is to provide additional functionality, features or flair to the HTML5 framework.

To ensure the best compatibility across the majority of devices, you want to have a website which is usable without the jQuery enhancement. Then, once you have that, you can use jQuery (and/or standard javascript) to add the "nice-to-have"s, like animations, AJAX interactions, geolocation, etc.

Lucanos is right in the sense that HTML and jQuery aren't alternatives. (Browsers display HTML, and then you write JavaScript — possibly using a framework like jQuery — to manipulate that HTML in custom ways where necessary.)

However, if you're using “HTML5” in the Apple sense of the word (ie to describe HTML5, CSS3, and browser-specific extensions to CSS), then there are some choices to make — eg some WebKit-based mobile browsers support CSS animations, which should perform faster than JavaScript animations.

I'm not familiar with jQuery Mobile — it might well use CSS animations when they're supported, and simulate them when they're not, meaning you get wider compatibility without much runtime performance cost.

But for mobile, personally I think you're better off picking the most popular platforms (ie iOS and Android), and writing to their capabilities, without bothering with a framework like jQuery Mobile. That way you serve most of the market with less effort (and thus serve them better), rather than making everyone download jQuery Mobile just to serve a few older phones that'll get binned in a year or two anyway.

Disclaimer: this depends entirely on your target market. If they all use old phones, write to the capabilities of those phones.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM