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.
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...
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?