1. Foundational Concepts & Core Architecture

What does REST stand for, and who defined it?

Answer: Representational State Transfer, defined by Roy Fielding in his 2000 doctoral dissertation (Architectural Styles and the Design of Network-based Software Architectures). It is an architectural style for distributed hypermedia systems.

Key Takeaway: REST isn’t a protocol or a standard; it’s a set of architectural constraints designed to maximize scalability, modifiability, and distributed performance.

What are the 6 core constraints of the REST architectural style?

Answer:

  1. Client-Server: Separation of concerns between the user interface (client) and data storage/processing (server).
  2. Stateless: Each request from client to server must contain all necessary context.
  3. Cacheability: Responses must define themselves as cacheable or non-cacheable to prevent unnecessary network roundtrips.
  4. Layered System: A client cannot tell whether it is connected directly to the end server or an intermediary (e.g., load balancer, proxy, CDN).
  5. Uniform Interface: Simplifies and decouples the architecture. Relies on resource identification, manipulation through representations, self-descriptive messages, and HATEOAS.
  6. Code-on-Demand (Optional): Servers can temporarily extend or customize client functionality by transferring executable code (e.g., JavaScript applets).

2. URI Design & Resource Modeling


3. HTTP Methods & Semantics


4. Status Codes & Payload Design


5. Advanced REST & Architectural Depth


6. Security, Performance & Scalability