The majority of development work involved in creating a JavaScript single page application is generally going to be on the frontend, but not to be overlooked is the all-important data-transfer layer of your application, which communicates with the server and the database. Representational State Transfer (REST) is the standard architectural style of data transfer between client and server for the World Wide Web and the Internet of Things (IoT). Any time you use a web application, chances are that REST is being used to communicate data and transitions of state from the UI.
The beauty of using the REST architectural style for a SPA is that the frontend of your application can be entirely agnostic of what type of software is being used to retrieve requests on your server, as long as your application can be used over Hypertext Transfer Protocol (HTTP), the standard application protocol for the World Wide Web.
In this chapter...