jQuery is still "needed"?

5

I have recently been asked about the real need to still use jQuery in new web projects. I know that it was, until recently, the best (and in many cases the only) way of handling HTML elements and make Web requests without worrying about differences between browsers and without having to write thousands of lines of code to accomplish simple tasks.

The following features are now easily available with native browser browsers:

Igottheideaofthefeatures from here >.

I know the jQuery syntax is most often, clearer and more compact. But the question is: jQuery is still "required" ?

Note: I put quotation marks around because I know there is no need in the strict sense of the word.

    
asked by anonymous 02.05.2015 / 01:59

2 answers

2

You need: NO Jquery for the purposes indicated in the image is almost unnecessary (although I think it is better to use jquery to make AJAX requests), but * when you want to work with the graphical interface (make it look more beautiful, responsive) your portal will require the use of some plugin or framework (if you do not want to do everything manually) they have as prerequisites the use of jquery. Some examples of frameworks that have jquery prerequisites: JQuery UI , Twitter-Bootstrap and Fondation .

    
02.05.2015 / 02:28
4
  

"The following features today are easily obtained with native browser-based Javascript"

And have always been, how do you think jQuery was written? JQuery is JavaScript, its use is just to shorten the code. Coming from this idea, jQuery has grown into what it is today, becoming one of the best JavaScript libraries.

If it is necessary? That goes from opinion to opinion. I think this depends on a lot of the project. If you want something with great speed, use Vanilla JS. Now if it's something standard that does not need anything extreme, what's the point of not using jQuery?

Would you rather use instead ?

$('.element').animate({
  top: 50px,
  left: 50px
});

Another example is the convenience of using $('elemento.classe') to get a DOM element instead of document.querySelectorAll("elemento.class") .

    
02.05.2015 / 02:33