Introduction to REST (Revisited)

I get a lot of questions around RESTful practices and I see a lot of confusion out there in REST API land about what REST really means, is, and how to implement it.  Last November 2012, I talked at the Pearson Technology Summit in Denver, Colorado.  The talk is entitled “Instant REST Services with RESTExpress” but spends some time during the first have to revisit the six REST architectural constraints.  While the lapel mic was giving me troubles and causing some noise on the recording, the content is definitely understandable.  Enjoy.

[youtube http://youtu.be/XcNDRr5zaI0]

 

The Six Constraints of the RESTful Architectural Style are:

  • Uniform Interface
  • Stateless
  • Client-Server
  • Layered System
  • Cacheable
  • Code on Demand

How To Design A Good API And Why It Matters

In 2006 (yes, before the RESTful era), Joshua Bloch gave a talk entitled “How to Design a Good API and Why It Matters.”  While it’s not directly applied to RESTful design, Joshua’s list of “Characteristics of a Good API” is extremely applicable.  Watch the YouTube video below to hear the talk (this one’s from 2007).  My own summary of important points is at the bottom of the post.

Here is a brief checklist summarizing Joshua’s “Characteristics of a Good API”:

  • Easy to Learn
  • Easy to use, documented or not
  • Hard to use incorrectly
  • Easy to read, understand and maintain the code that uses it
  • Just enough power to satisfy requirements
  • Easily extensible
  • Appropriate for the audience

RESTful Best Practices (v1.1)

Get the Pearson eCollege RESTful Best Practices guide (choose your format). This guide reduces the world of RESTful services into easy-to-follow principles. It also provides several cookbook type recipes in critical areas to increase service usability, reduce confusion during implemenation, as well as improve consistency.

Intro to REST

The REST architectural style describes six constraints. These constraints, applied to the architecture, were originally communicated by Roy Fielding in his doctoral dissertation (see http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm) and defines the basis of RESTful-style.  This video introduces the six contraints as an introduction to REST.

Introducing RestExpress: Instant, High-Performance, RESTful Services in Java

RestExpress is the easiest way to create RESTful web services in Java. An extremely Lightweight, Fast, REST Engine and API for Java. Supports JSON and XML serialization automagically as well as ISO 8601 date formats. A thin wrapper on Netty IO HTTP handling, RestExpress lets you create extremely scalable, stand-alone REST web services rapidly.

RestExpress is the easiest way to create RESTful web services in Java. An extremely Lightweight, Fast, REST Engine and API for Java. Supports JSON and XML serialization automagically as well as ISO 8601 date formats. A thin wrapper on Netty IO HTTP handling, RestExpress lets you create extremely scalable, stand-alone REST web services rapidly.

It takes 5 minutes to get your first services up and running using the kickstart application and we’ve seen 15,000+ requests per second and 10,000 simultaneous connections on a single desktop box. Try accomplishing that with the competition!

Inspired by Ruby on Rails and Sinatra, RestExpress is designed as a micro-framework with sub-projects, Syntaxe, RepoExpress and OAuthExpress to provide domain/DTO validation, MongoDB persistence storage and OAuth authentication simply and easily.

Check it out (literally) at www.GitHub.com!