The Artima Developer Community
Sponsored Link

Java Community News
Does REST Need WADL?

3 replies on 1 page. Most recent reply: Jun 7, 2007 5:20 PM by Michael Gratton

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 3 replies on 1 page
Frank Sommers

Posts: 2642
Nickname: fsommers
Registered: Jan, 2002

Does REST Need WADL? Posted: Jun 5, 2007 5:05 PM
Reply to this message Reply
The Web Application Description Language (WADL) is a recently proposed description language for REST-based Web services, similar in intent to WSDL for XML-RPC-based services. In a recent blog post, Joe Gregorio questions the need for a REST-friendly description language, including the need to automatically generate code for RESTful services.

REST-based service interfaces are increasingly popular for Web based information services. REST's resource-oriented design center is often found to be simpler, more straightforward, than alternative RPC-style services interfaces. Many publicly available Web services now support REST interfaces, such as Amazon's S3 and Yahoo's search service.

Advocates of RPC-style service interfaces often claim that, while REST may be conceptually simpler, the complexity of RPC-style service implementations, such as SOAP, are often hidden by tools capable of automatic code generation. As a result, developers are shielded from SOAP and XML-RPC complexity, and are instead free to work with Web service interfaces at the level of programming language source code.

Automatic code generation for XML-RPC services is possible because those services often publish their interfaces in the form of a WSDL (Web Services Description Language) document. A WSDL document can provide enough information for tools to generate programming language service stubs and associated interfaces to invoke a Web service.

The Web Application Description Language (WADL), originally proposed in 2006 by Marc Hadley, promises a similar descriptive functionality for REST-based services:

WADL is designed to provide a machine processable protocol description format for use with ... HTTP-based Web applications, especially those using XML.

The biggest benefit of WADL, according to Hadley's paper, is that WADL documents allow developer tools to generate programming language code for REST-based services. Given that REST-based services encompass a broad category, including the static portions of any Web site, WADL could make it easier to write programmable applications that make use of data already available on the Web.

A recent discussion by Joe Gregorio, Do We Need WADL?, however, questions the need, not only for WADL, but also for automatically generating code for REST-based services:

The urge to code generate is particularly strong around XML Schema. You might believe you can talk people out of using WADL that way, but I doubt it; people will see XML Schema and will automatically look for the code generation button. That way of thinking is baked into the culture...

The second cultural hurdle is the implicit assumption that all useful data will be in the form of XML, which ignores the vast amount of non-XML content on the web today, which, outside of RSS and Atom, is all of it (HTML, CSS, JavaScript, podcasts, videos, JSON, etc.). Do I really need to bring up the painful memories of binary content and SOAP?

In addition to the importance of the variety of document types a RESTful service can return, Gregorio also mentions the difficulty of evolving services when automatically generated code exists for a service and, more important, whether RESTful services really need to think about protocols in a way XML-RPC-based services do.

Do you think automatic code generation for REST services via a service descriptor is useful? Does REST need WADL?

Ivan Lazarte

Posts: 91
Nickname: ilazarte
Registered: Mar, 2006

Re: Does REST Need WADL? Posted: Jun 5, 2007 8:47 PM
Reply to this message Reply
awesome, more code generation. i look forward to having my wadl generator producing broken code against amazon ec8 a few years from now.

Roger Voss

Posts: 27
Nickname: rogerv
Registered: Aug, 2005

Re: Does REST Need WADL? Posted: Jun 6, 2007 12:48 AM
Reply to this message Reply
For distributed applications tightly binding to schema or API calls is a bad idea. Instead is best to stick to loosely coupled messaging approach where context complete communication style is used.

XML data "duck typing"

Building Effective Enterprise Distributed Software Systems

Michael Gratton

Posts: 4
Nickname: mjg
Registered: Apr, 2003

No [n/t] Posted: Jun 7, 2007 5:20 PM
Reply to this message Reply

Flat View: This topic has 3 replies on 1 page
Topic: How Do You Use XML? Previous Topic   Next Topic Topic: Apache Releases Java Caching System 1.3

Sponsored Links


Copyright © 1996-2018 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use