O'Reilly logo

SPA Design and Architecture: Understanding single-page web applications by Emmit A. Scott Jr.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix B. Review of the XMLHttpRequest API

This appendix covers

  • A review of the XMLHttpRequest API
  • The building of an XHR data source module

In this appendix, you’ll review the low-level API for making a server call. In a real-world application, you’ll likely rely on your MV* framework for XHR calls if it has this capability built in or a helper library such as jQuery if it doesn’t. These frameworks and libraries often abstract away much of the boilerplate code and provide you with simple, easy-to-use methods instead. Even so, it’s good to have at least a general idea of what’s going on under the covers. That’s why I’ll stick with vanilla JavaScript here, so you can see basic XHR mechanics at work. I’ll also not be using RESTful calls ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required