
Increasingly,
web services
are an integral part of user experience (UX) on the internet. Web
services are behind everything, from the gadgets on your iGoogle home
page to your favorite apps in Facebook.
The first step in the internet’s evolution was all about the portal
— AOL, Yahoo, Microsoft and Google all vying for eyeballs and clicks.
Now that the internet has matured a bit, we expect more from it.
Web 2.0 has been the next logical step. Social networking sites like
MySpace and Facebook; social media sharing sites like YouTube, Flickr
and Last.fm; auction sites like eBay and Craigslist and social
bookmarking sites like Delicious and Digg — all improve upon early web
concepts with new features (tags, widgets, etc.) that make extensive
use of web services. These companies have created valuable properties
online, and the next growth phase will rely on using web services to
integrate and remix existing content.
This is where RESTful web services come in. REST stands for Representational State Transfer.
In essence, a RESTful web service uses the web the way it was designed
to be used. Each entity is represented by a url so that resources can
be accessed in a clean and logical manner. The photo hosting site
Flickr is a good example of a site that follows RESTful web service
practices, even for its user-facing pages.
This means that I can access all of the Springbox photos via the url:
http://www.flickr.com/photos/springboxinteractive
If I want to see all Springbox photos that were posted on August 8th, 2008, I can go here:
http://www.flickr.com/photos/springboxinteractive/archives/date-posted/2008/08/08
Or if I want to see all of the photos with a tag of “Austin” I can go to:
http://www.flickr.com/photos/springboxinteractive/tags/austin
As you can see, these urls have meanings that correspond to the
layout of the web service. Once the layout is understood, it’s easy to
access different resources: simply change part of the url. For
instance, given the examples above, I know at a glance that the url
http://www.flickr.com/photos/springboxinteractive/archives/date-posted/2008/04/03
has all of the photos that were posted on April 3rd of last year.
This simplicity of design is one of the things that make RESTful web
services so useful. By using meaningful urls in a logical manner,
RESTful web services (and sites like Flickr that adopt these techniques
for their customer-facing pages) expose resources in a highly
transparent manner. In the case of Flickr, this encourages exploration,
making it easier for the user to find the content they’re looking for.
In the case of web services that utilize the REST design model, it
means developers can more easily integrate and create valuable new
properties based on that service.
Another key aspect of UX is responsiveness, and RESTful web services
are very lightweight in this regard. Sure, your rich media application
can have all kinds of bells and whistles — but if it takes forever to
load and use, no one will care. Because RESTful web services provide
simple XML (or JSON) documents over HTTP (just like user-facing web
pages do) they represent a bare-metal approach to providing data on the
web. This means that sites and applications (Flash, Silverlight, etc.)
that are designed to correctly utilize RESTful web services will
typically perform better than ones that rely on the more heavyweight
alternatives like SOAP.
The internet has changed dramatically over the last few years. Sites
like YouTube and Facebook have expanded the vocabulary of the web, and
end-users are no longer content with a static site that offers little
in the way of interactivity or integration with the greater web
ecosystem. Web services are the key to providing this integration of
data and functionality, and RESTful web services currently represent
the most efficient and unobtrusive means to that end.