The REST definition includes 6 constraints on clients and servers:
Uniform Interface: this constraint simplifies and decouples the architecture, enabling each part to evolve independently. For us this means: HTTP Verbs (GET,POST,PUT,DELETE), URIs (resource name), HTTP response (status and body)
Stateless: every request to the server must contain all of the information necessary to get the desired result
Cacheable: because many clients can access the same server, the server has the authority/ability to cache responses for faster response time
Client-Server: the interface between client and server enables separation of concerns. Client: concerns of interface, portability, user state, etc. Server: concerned with data storage. The static interface allows freedom of development and replacement of servers and/or clients.
Layered System: server-side responses may come from a single machine or from a set of intermediary servers in adidiont to the primary server. These configuration options are available on the server-side without having undo impacts on the client.
Code-On-Demand (optional): it is not prohibited to have the client run some of the server logic when this approach may be faster or more efficient.
HTTP Details
Communication between a host and a client occurs via a request/response pair. The client initiates the request. The server gives an HTTP response.
HTTP is a versioned protocol. Current version is 1.1
Web Frameworks and Libraries that can be used to create HTTP servers:
ExpressJS (a library for Node.js) which is based on and shares similar language with a Ruby Web framework called Sinatra
Ruby on Rails
jQuery Ajax - this is an interesting library because it is client-side-centric. As such, it is an inversion of other frameworks used to create HTTP servers. Ajax allows us to read responses and modify requests.