Web Services

Dennis Heimbigner <dennis[dot]heimbigner[at]colorado[dot]edu>

A REST Design Methodology

Selected Sources

REST Notional Architecture

Step 1: Designing the Server's External Interface

REST Elements

  • Resource structure graph
  • URI tree
  • Representations for each node type in the graph/tree
  • Defined operations on each resource type
Figure 2. Resource/URI Graph Example

Defining the Resource Graph

Defining the URI Hierarchy

URI Tree Grammar Example

  • Given the relations that form the spanning tree, it is relatively easy to design the URI hierarchy using some form of grammar.
    • e.g. BNF or regular expressions
  • Example: Address book
    URI => AddressBook | MemberSet | GroupSet | MemberId | GroupID
    AddressBook => "/addresses"
    MemberSet => AddressBook "/member"
    MemberID => MemberSet "/" INTEGER
    GroupSet => AddressBook "/group"
    GroupID => GroupSet "/" INTEGER
  • Node Representations

    Syntactic Specification Options

    Specification TargetNotation Options
    Resource Graph
    • Zed (Z)
    • Alloy
    • Structural Computing (E.g. Themis)
    • Relations
    URI Tree
    • BNF
      • X Schema
      • RELAX NG
      • Yacc
    • Regular Expressions
    Documents
    • All Documents
      • MIME Types
    • XML Documents
      • X Schema
      • RELAX NG

    REST Semantics

    Specifying REST Interfaces

    REST Client Design Elements and Issues

    Client-Side Mapping of REST to Object Interface

    Server Side Controller

    Server Side Model

    More to come...