Site icon Westmorr Consulting

Ajax – Don’t Forget the Basics (or go learn them)

During interviews, I often ask candidates how to “manually” implement an Ajax call in classic JavaScript. I’m not asking for the exact perfect syntax off of the top of their heads, however, I do want to hear about the basic core/native classes, objects, properties, and methods that enable asynchronous request/response handling.

Many developers only know the jQuery shorthand syntax (i.e. $.ajax and friends), and many know neither implementation (native nor jQuery) at all. For the former, I usually take jQuery away as an option and then commonly discover that fundamental knowledge of native JavaScript is poor, and really to the point of the question, that a solid understanding of asynchronous message processing is lacking.

Hopefully this post gives the reader some insight on objects and concepts that s/he should know well if s/he wants a deeper understanding of asynchronous request processing in HTTP through JavaScript.

So, what native classes, objects, and properties I’m referring to:

And, what should one generally know at a minimum

Of course, there are many web based and bound tutorials on this topic; read through them and determine which is most effective and follows safest/best practices. Me, personally, I learned my basic implementation from a book titled, “Bulletproof Ajax” by Jeremy Keith many years ago and have continued to build on those concepts ever since.

Exit mobile version