Re: Service description value for hypermedia?

On Jun 16, 2005, at 1:43 PM, Mark Baker wrote:
>
> Here's a scenario;
>
> 1. An Atom client is provided an introspection URI for a remote Atom
> service by its user
> 2. The client invokes GET on the introspection URI, returning an
> introspection document (application/atomserv+xml)
> 3. The client examines the introspection document and locates the
> URI of a collection of entries
> 4. The client POSTs an Atom entry to that URI
> 5. The server responds with a 201 response as well as a HTTP
> Location header with a URI value that identifies that entry
>
> In all of those steps, it seems to me as though the relationship  
> between
> the URIs is already well defined by existing specifications (which can
> obviously be referenced at design time 8-).  For example, in step 3, a
> client need only understand the application/atomserv+xml media type to
> be able to extract the URI for the collection of entries.  And in step
> 5, the client need only know the HTTP and Atom protocol specifications
> to know that the URI returned in the Location header is that of the
> entry just POSTed.
>
> So where exactly do yo see the value-add in a description language
> in this scenario; what can be done that couldn't be done - or done
> better - without an SDL?  Why is anything more than HTTP & Atom
> required for what you want to achieve, even to generate code?
>
A human can write (generate) code based on the Atom spec, a machine  
can't unless you can digest the Atom spec into some machine process- 
able format.

E.g. I could write myself an Atom feed class along the lines of (I  
haven't committed the Atom format to memory so the cardinality and  
names of properties might be way off base here):

public class AtomFeed {

   public AtomFeed(URI feedURI) {
     ...
   }

   public Map<URI,String> getCollections() {
     ...
   }

   public URI addEntry(URI collection, AtomEntry entry) {
     ...
   }
}

A description format could allow a code generator to spit out  
something similar.

Marc.

>
>> There's nothing wrong with even having the actual instance URI in the
>> description language.  Walmart could say "for you customer Mark, I'm
>> going to give you your own WDL and it says that you can edit your  
>> user
>> info at URI foo".  Now why they would duplicate a URI in the WDL  
>> and in
>> the instance is up to them, and that case means that there has to  
>> be a
>> 1:1 relationship between the description language instance and the  
>> URIs.
>>
>
> That sounds fine to me.  It shows that one person's design time is
> another person's runtime. 8-)
>
>
>> Hypermedia is about URIs, that's the "hyper" part.  That doesn't
>> constrain to when the URIs are described or discovered.
>>
>
> Right.
>
> Mark.
>
>

---
Marc Hadley <marc.hadley at sun.com>
Business Alliances, CTO Office, Sun Microsystems.

Received on Thursday, 16 June 2005 18:24:18 UTC