Microsoft's Internet Explorer browser has no built-in vector graphics machinery required for "loss-free" gradient background themes.

Please upgrade to a better browser such as Firefox, Opera, Safari or others with built-in vector graphics machinery and much more. (Learn more or post questions or comments at the Slide Show (S9) project site. Thanks!)

Web Services REST-Style: Universal Identifiers, Formats & Protocols

Agenda

  • What’s REST?
  • Universal Identifiers, Formats & Protocols
  • The Holy REST Trinity – Noun, Verbs, Types
  • REST Design Principles
  • Architecture Astronaut REST Speak

What’s REST?

Representational State Transfer (REST) – Meaningless Acronym? Wordplay?

rest – n. – peace, ease, or refreshment resulting from the insight that the web works

No matter what vendors tell you – no need to “Light Up the Web” – relax – built on an open architecture using universal identifiers, formats & protocols and evolving open standards – no need to reinvent the wheel and sign-up for single-vendor offerings.

Broad Definition

  • Best Practices for Designing Web Services for a Unified Human and Programable Web

Narrow Definition

  • Alternative to BigCo Web Services (SOAP, WS-STAR) and RPC-Style Web Services (XML-RPC)

Resource, Representation, State, Transfer

  • (Stateless) Resource Representation -> Open Format + Identifier e.g. HTML+URI
  • Transfer Rules (Protocol) e.g. HTTP

Universal Identifiers, Formats & Protocols – The Holy Trinity

  • Identifiers -> URLs (Uniform Resource Locator), URIs (Uniform Resource Identifier)
  • Formats -> HTML (HyperText Markup Language), XML (Extensible Markup Language)
  • Protocols -> HTTP (HyperText Transfer Protocol), AtomPub (Atom Publishing Protocol)

The Holy REST Trinity – Noun, Verbs, Types

REST-Speak – Internet-Speak – Plain Old English

  • Verbs -> Protocols -> Communication & Data Exchange Rules
  • Nouns -> Identifiers -> Names, Addresses
  • Types -> Formats -> Documents, Feeds, Photos, Videos, Music, etc.
  • Verbs -> HTTP GET, POST, PUT, DELETE
  • Nouns -> flickr.com/photos/tag/vancouver, deli.cio.us/vanajax/tag/libraries, etcetera
  • Types -> HTML, RSS, PNG, etcetera

REST Design Principles – What’s REST?

  • Idenifiers Matter – Choose Great Names
  • Open Formats Matter – Avoid Vendor Lock-In
  • Protocols Matter – Learn more about HTTP and Use Best Practices
    • Use HTTP GET for Read-Only/Side-Effect-Free Requests
    • Use HTTP Accept Headers for Format Selection
    • Use Full HTTP Method Vocabulary (GET, POST, PUT, DELETE)
  • No Web without Linking and No Linking without Identifiers!
  • (Stateless) Resource Representation -> Open Format + Identifier e.g. HTML+URI

Architecture Astronaut REST Speak

  • REST-y
  • REST-ful
  • Resource-Oriented Architecure (ROA)
  • Web-Oriented Architecure (WOA)
  • REST-RPC-Hybrid (Three Web Service Architectures – 1) REST, 2) REST-RPC Hybrid, 3) RPC[1] )

1 RPC -> Remote Procedure Call