What are the differences between jQuery and jQuery Mobile?

2

I was reading today about the jQuery Mobile framework and from what I understood it would be for jQuery as Bootstrap is for CSS.

I do not know if I understood correctly, but the question remains: does jQuery Mobile also have the same functionality as conventional jQuery?

And now that more and more Internet access comes from the mobile, does it make more sense to use jQuery Mobile instead of conventional jQuery?

    
asked by anonymous 17.04.2017 / 18:08

2 answers

1

Framework for front-end mobile

The manufacturer's own definition:

  

jQuery Mobile is a touch-friendly UI framework built on jQuery Core   that works across all popular mobile, tablet and desktop platforms.

This answers the first question about having the same jQuery features. This is because this framework is an extension of jQuery and is directed to building the front-end of the application. So, for it to work you need to install jQuery.

On its analogy with Bootstrap and CSS, I believe it can work, however Bootstrap is almost everything CSS and jQuery Mobile has other functions besides the styles part, but I see no problem to facilitate understanding. >

Explaining a little more, this framework is intended to facilitate the development of "responsive" and mobile-oriented sites, that is, when desktop use is not the priority. But if the desktop user logs in, he will be able to browse and use it as well.

The idea is that you do not have to worry about the screen size of the phone or tablet that is accessing the site. This is interesting because you can program in HTML5 and your application will work for any mobile device without the need to write native device code. However, it will have some limitations, of course, especially with regard to the sensors of the devices.

I think it is not worth going into details of how it works or examples because I imagine the question is more related to the concept of the framework. If you'd like to explore more, you can access the demo page .

On your question whether it pays to use one or the other, I believe that with the explanation it loses its meaning. You can use everything from jQuery when using jQuery Mobile. Perhaps the question would be whether it pays to use it rather than another approach. For example, Bootstrap also gives you "responsive" design that will work regardless of device screen size, but jQuery Mobile has many other features and Bootstrap is more for the visual part.

For this last comparative question, better put in another question. IMHO compensates jQuery Mobile only if the application is for mobile use only.

    
17.04.2017 / 19:33
1

Well, I'll give you my understanding of the difference between them, correct me if I'm wrong.

JQuery

The main goal of JQuery is to simplify and somewhat standardize the cross-browser JavaScript, making things easier to manipulate HTML elements and making HTTP requests

JQueryUI

It's a set of interface elements (buttons, datepickers, sliders, tabs, stuff) made using JQuery, that is, JQueryUI needs JQuery to work. (JQueryUI = JQuery User Interface)

These two above were meant to be an addition to your site (be it desktop or mobile), adding features like the ones I mentioned above.

JQuery Mobile

JQuery Mobile, unlike the other two above, is a complete framework for development. The intention is that it is the starting point of your site. It requires JQuery and uses JQuery and JQuery functionality to make it easier to build Mobile sites.

Another difference is that JQuery and JQuery UI are meant to be used as if they were an extra layer in your HTML and CSS. For example, you have input to choose date, and turns it into a plugin with JQuery:

$('#meu_input').datepicker();

Now JQuery Mobile provides ways to choose where these differentiated elements will appear only with the use of HTML:

<ul data-role="listview" data-inset="true" data-filter="true">
    <li><a href="#">Acura</a></li>
    <li><a href="#">Audi</a></li>
    <li><a href="#">BMW</a></li>
    <li><a href="#">Cadillac</a></li>
    <li><a href="#">Ferrari</a></li>
</ul>

The data-role attribute tells JQuery mobile to make this list a friendly component for mobile platforms. data-inset and data-filter define attributes of this element, without using a single line of JavaScript.

I've used a little bit of self-knowledge and this to formulate this answer

    
17.04.2017 / 19:04