Re: Use Cases

Tim Bray wrote:

> > except for HTTP and any shared MIME types, everything in a RESTful 
> > system is discovered at runetime.
> 
> Who said?  I disagree entirely.  Just because the SOAP-heads blew 
> WSDL doesn't mean that there's anything intrinsically wrong with the 
> notion of declaring a REST interface.  It would help with things like 
> tooling and testing and automation, too.

I strongly agree.  (Well, it would be impolitic of me to agree with the 
crack about the SOAP-heads blowing WSDL, so I'll just be neutral on that 
and strongly agree on the rest, pun in tended.)  Anyway, long ago and far 
away I gave a talk on XML Schema in which I claimed that schemas were 
useful for at least 3 main purposes [1].

* Contracts:  agreeing on formats
* Tool building: know what the data will be 
  before the first instance shows up
    - Database integration
    - User interface tools
    - Programming language bindings
* Validation:  make sure we got what 
  we expected

As Tim says, you get just the same kinds of benefit by having a declared 
description for a REST interface, and I'm not implying that the 
description need in any way be based on XML Schema in particular.  The 
description should be at whatever level and in whatever form meets the 
above needs for you. 

It's also true that it's a good thing if the runtime interaction is indeed 
self-describing.  That's fundamental to the Web.  If you have no advance 
description, then you need runtime self-description to understand what 
you've got;  if you have an advance description, then the information 
retrieved at runtime lets you "validate" that what you've received indeed 
matches your expectations.  The runtime stuff always wins, but the advance 
description can be very useful.

> > IMHO, HTTP and the shared understanding of a MIME type *and* the 
> > intention of the client developer at design time are sufficient to 
> > actually implement the client side - if the design time 
> > expectations do not hold at runtime this will be detected at 
> > runtime. (I do not consider this a problem since there cannot be a 
> > design time constraint on the runtime in a distributed system 
> > anyhow so you allways need to check and expect insifficient data)
> 
> My experience differs.  When building a heterogeneous distributed 
> system, I'd like to have a contract that operates at a higher level 
> than a MIME type, so that when things break, you can finger-point 
> constructively.  -Tim

Yup, I agree with that too.

Noah

[1] http://intertwingly.net/slides/2002/devcon/SchemaSecrets.ppt

--------------------------------------
Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142
1-617-693-4036
--------------------------------------

Received on Wednesday, 7 June 2006 20:17:55 UTC