Home > SOA Tips > The Web Services Advisor > REST: Simplicity in Web Services design
SOA Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

THE WEB SERVICES ADVISOR

REST: Simplicity in Web Services design


Daniel Rubio, Contributing Writer
11.29.2005
Rating: -3.25- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Linking Web service requesters and providers entails a fair amount of work for both parties, encompassing such things as agreeing on the business function to be fulfilled, the technical contract details and of course integrating the service into the grander scheme of an application. But far too often using the standardized SOAP/WSDL approach becomes overly complex in such scenarios.

There is an alternate approach to deploying a Web services compliant architecture named REST, Representational State Transfer. REST is a technique coined by Roy Fielding in the year 2000 during what was his doctoral dissertation, While it is questionable if he had the prescience to create an approach that would compete head-to-head with industry heavyweights and consortium specifications, since then the REST acronym has come to center stage in Web services design.

What is it about REST that makes it different from standard SOAP/WSDL? The simplicity in shedding some of the heavyweight requirements needed in the latter approach, which on many occasions prove unnecessary to achieving the basic functionality of a Web service.

In order to gain a little more perspective on REST, let's recap a typical process for a SOAP/WSDL design:

1 - Provider creates and implements a Web service interface onto an existing application.

2 - Provider creates a WSDL contract in order to distribute the Web service details to potential consumers.

3 - Consumer obtains WSDL contract for consumption.

4 - Consumer implements the WSDL in a specific platform - Java, C#, PHP, Perl - and creates a caller application.

The biggest rub in this process lies on the consumer. Not only will he have to deal programatically with extracting the Web service payload -- e.g. the SOAP message -- in order to do something useful with it in the application, but he will also need to go the extra mile also programmatically, through WSDL, to do the initial service request...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
The Web Services Advisor
What to expect with the new JavaScript standardization (ECMAScript 5)
Restlet framework wrestles RESTful Web applications
3 tips for choosing whether to use EGL
Use SoaML to facilitate Model Driven Architecture
Enterprise mashup patterns act as API enablers
XQuery learns to write using XUF
Descriptive Languages for RESTful Services
Notable Python language update on view
Try XML-based Extensible Business Reporting Language (XBRL) for accounting reports
Whatever happened to ''X''?

SOAP (Simple Object Access Protocol)
On the road to SOA – Part 1, Boubez on early insights
Progress/Actional SOA diagnostic tool builds on Mindreef purchase
InterSystems Ensemble environment adds binary SOAP messaging
User combines open source ESB with data services to speed customer reports
WSDLs get a report card
Simple Object Access Protocol (SOAP) Tutorial
Web services for Windows CE
SOA for pets uses REST and SOAP
Netrics uses SOAP to clean data
Mindreef updates SOA testing tools
SOAP (Simple Object Access Protocol) Research

WSDL (Web Services Description Language)
WSDL Tutorial
WSDLs get a report card
Amazon Mechanical Turk Web services app touts improved development GUI
SOA triple play: Policy meets Semantic Web
Eclipse Ganymede: Web Tools build SOA foundation
Java One: Mule architect looks to bring REST to SOA
WSDL technology
A middle way to SOA governance
WSDL 2.0, new messaging for Web services
WADL: The REST answer to WSDL

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
DIME  (SearchSOA.com)
endpoint reference  (SearchSOA.com)
SOAP  (SearchSOA.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


in order to get the payload. If you have gone through this process on various occasions like many, you probably accept it as a given fact when dealing with Web services. Yet this process can often prove to be overkill, so lets take a step back to the essence of a Web service.

The main reason Web services are on many IT department's agendas is quite simple: To achieve interoperability between disparate systems, for instance an SAP ERP communicating with a Java application or a PHP Web site connecting to a .NET news service. With this definition in hand, let's analyze a very common service which complies with this interpretation and uses REST at its core, Atom and RSS news feeds.

Initially conceived in the blogsphere and now on pretty much every mainstream site, a news feed allows a provider to publish site updates and a consumer to fetch such updates in an on-demand fashion. Behind the scenes, a provider site can be built in Java, PHP or Perl while providing an XML payload formatted as either RSS or Atom. The update can later be consumed by an application also written in any language.

A quick glance around the Web can show you the extent of news feeds. There are a multitude of applications (consumers) that aggregate RSS data feeds from around the Net to provide enriched content, all taken from third party services.

The process is straightforward and can actually be more flexible than just providing the read functionality that RSS/Atom services offer. Since a REST process is executed within the context of HTTP, all of its operators -- get, post, put and delete -- are on hand to achieve whatever business function needs to be fulfilled.

If you are still somewhat skeptical about the concept behind REST thinking it's more academic or that RSS and Atom news feeds are an isolated scenario, let's look at more production type applications that use REST.

eBay's REST API allows developers to tap into its numerous sources of information in order to integrate this same data onto third party applications. Yahoo's Web services offerings are also strongly rooted on REST, so much that they currently don't even offer SOAP support. Yahoo only uses REST.

These few examples should give you a feel for how REST developed Web services have a strong community backing, but hold on, just like every technique REST also has its shortcomings. If there is a common thread among REST Web services it's the non-vital nature of the data they handle.

Transporting more sensitive data through applications such as financial data or procurement information requires the use of more sophisticated features like transactions, failover capabilities and quality of service. Given REST's simplicity that can prove to be a complicated undertaking. Not that this last scenario is impossible to achieve through REST, but under these types of enterprise requirements the design balance starts to tilt in favor of the heavier-weight SOAP/WSDL approach.

SOAP, through its series of complementary specs such as WS-Policy, WS-Security, WS-Reliabilty and WS-TranscationManagement among others, gives you a clear roadmap on how to address these issues from the outset whereas in REST these issues become more complicated to integrate into an application.

Although REST is not appropriate for every scenario it can make creating and interacting with Web services much simpler. Given its wide deployment by major portals and its no-nonsense approach, it's a compelling approach to explore on your next Web services design undertaking.

About the Author

Daniel Rubio is an independent technology consultant specializing in enterprise and Web-based software, He blogs regularly on these and other software areas at http://www.webforefront.com.






Rate this Tip
To rate tips, you must be a member of SearchSOA.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



SOA Trends and Strategy - SOA Education, SOA Development, SOA Implementations
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2001 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts