REST API & SOAP - ryantc94/Knights-of-Arthur GitHub Wiki

REST API

http://www.restapitutorial.com/lessons/whatisrest.html

  • Quick Note: My understanding of REST API is just a middleman for processing HTTP Methods, Database Manipulation/Resource Manipulation, and HTTP Responses.

6 Constraints

  1. Uniform Interface: (example [doesn't have to be http]: HTTP Request (representation), URI, HTTP Response)
  2. Stateless: Server contains no client state (each request contains enough info for server to process info), representation contains all the state
  3. Cacheable: Representations are cacheable (implicitly, explicitly, negotiated)
  4. Client-Server: a disconnected system (client won't have direct connection to database/resources), Uniform Interface is the link between the two
  5. Layered System: Restful architecture could have multiple layers of software, client doesn't know if resource comes back from cache or database. Client only knows API and response representation.
  6. Code on Demand (optional): From a restful service stand point, the server can transfer logic to the client. Such as executable JS snippets.
  • Compliance of these 6 constraints allows: scalability, simplicity, modifiability, visibility, portability, and reliability

Stateless Servers

SOAP ?????