Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it worth it to use jQuery for Ajax instead of building your own JavaScript?

Aside from the framework, is jQuery worth using rather than creating your own javascript? I've always debated if the framework was better to use than to create your own calls. Are their disadvantages of using it?

Sorry for beginner question, I'm trying to feel out if it would be better to use this and create some of the ajaxish workings of my site rather than develop it from scratch.

Are there other frameworks out there that would be better to use to create an ajaxish website?

like image 958
Petrogad Avatar asked Jul 23 '09 15:07

Petrogad


People also ask

Should I use jQuery for AJAX?

So, the real question is: should you use jQuery to perform your Ajax requests? And the answer is: yes, if you're already using jQuery - if not, you can include jQuery or another Ajax-supporting JS library, or you can implement the Ajax functionality in vanilla JS. Save this answer.

Is jQuery better than AJAX?

While JQuery is a library for better client-side web page development, AJAX is a technique of doing XMLHttpRequest to the server from the web page and sending/retrieving data used on a web page. AJAX can change data without reloading the web page.

Can I use jQuery instead of JavaScript?

jQuery takes a lot of common tasks that require many lines of JavaScript code to accomplish, and wraps them into methods that you can call with a single line of code. jQuery also simplifies a lot of the complicated things from JavaScript, like AJAX calls and DOM manipulation.

Is jQuery better than JavaScript?

Pure JavaScript can be faster for DOM selection/manipulation than jQuery as JavaScript is directly processed by the browser and it curtails the overhead which JQuery actually has. JQuery is also fast with modern browsers and modern computers. JQuery has to be converted into JavaScript to make it run in a browser.


1 Answers

Yes, jQuery is worth it. I speak as someone who resisted using any library for a long time, then finally saw the light.

I do recommend that you build some hand-rolled Ajax interactions before you dive into using jQuery for Ajax, so that you understand exactly what is happening with Ajax. Once that's achieved, though, let the library do the dirty work.

like image 196
chaos Avatar answered Oct 21 '22 04:10

chaos