Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJesse Dispoto
Front End Web Development Techdegree Graduate 14,538 PointsIs using jQuery for AJAX the preferred method? The way in the video seems convoluted and confusing
The way in the video seems convoluted and confusing, especially for doing so little with the request (or so it seems). On a larger scale, is using jQuery more acceptable?
2 Answers
Steven Parker
231,172 PointsOnce you've used jQuery to do AJAX, you'll never think of doing it with primitive calls again.
But there's also the Fetch API that brings the simplicity of jQuery to native JS. The only downside I can think of to Fetch is that it does not transparently handle certain CORS (security) situations like jQuery does.
Steven mudie
5,523 Pointsalso wondering if ajax is still relevant with a modern web stack as it says this course is getting retired in a month?
Jesse Dispoto
Front End Web Development Techdegree Graduate 14,538 PointsJesse Dispoto
Front End Web Development Techdegree Graduate 14,538 Pointsgreat, thanks for the explanation Steven Parker. I've used the jQuery method before when I was learning some basic js on my own, so this way in vanilla js was new to me. Is using the jQuery method (and/or Fetch API) the preferred method these days? I know jQuery is not as much of a sought-after skill as it was years ago, so I'm wondering (in the employment world) is it okay if one uses those 2 methods as opposed to doing it in vanilla JS?
Steven Parker
231,172 PointsSteven Parker
231,172 PointsI was trying to say I doubt anyone does it for real without jQuery or Fetch. I certainly don't.
And Fetch is "vanilla" JS — now.
But I'm curious about where you heard "jQuery is not as much of a sought-after skill"... ? It's a crucial component of some of the most popular frameworks around.