W3C home > Mailing lists > Public > www-tag@w3.org > March 2002

RE: Genericity, strong typing, SOAP-RPC, GRASP, and defining the Web

From: Miles Sabin <miles@mistral.co.uk>
Date: Wed, 27 Mar 2002 12:07:38 -0000
To: <www-tag@w3.org>
Message-ID: <001801c1d587$ff15bb00$a3eab8c3@milessabin.com>
Jeff Bone wrote,
> Miles Sabin wrote:
> > How does the receiver "party with anybody" other than by being 
> > able to process all ten message variants that it might receive? 
> > And isn't that just moving complexity from one place to another? 
> > Why here rather than there?
>
> Consider a "general" type --- say, text streams ala UNIX --- vs. a
> "specific" type, say "class AddressBook."  Now an address book can
> certainly be represented as a structured text stream.  As such, many
> interesting things can be done with it even by programs which don't
> understand class AddressBook:  the lines can be counted, it can be
> searched for occurrances of "Sabin," etc.  Representing an address
> book as a text stream doesn't prevent code that understands the 
> address book structure from using it as such, but representing it as 
> an instance of class AddressBook may prevent other code from using 
> it for any purpose.

Indeed not. But representing the address book as a text stream and
defining the interface of an address book processor in terms of text
streams means that we've simply shifted any type-related burdens from 
the sender to the receiver. The receiver has now stated that it's 
prepared to field any text stream, so it has to be able to test 
whether or not any given text stream _is_ a valid representation of an 
address book, and it has to be prepared to reject text streams which 
aren't.

You could, for example, rewrite any Java application using only one 
interface,

  public interface Generic
  {
    Object doStuff(Object arg)
      throws IllegalArgumentException
  }

but would you want to? Would that "simplification" really simplify
anything?

> Graph structures may play the same role for the Web that text 
> streams play in the above example.

I don't see that. I can see a rough and ready analogy along the lines 
of,

  file descriptor -> resource (or entity)
  file name       -> URI
  file system     -> web

in which case the analog of an HTTP exchange would be a function 
taking a file name and returning a descriptor. But your graph 
structures correspond to the file system, which only has an _implicit_ 
role. As such they play a completely different role to text streams:
they're the background or context for a transaction, rather than the
content of the transaction itself.

Yes, hypertext and other documents represent (or can be thought to
represent in some circumstances) those graph structures, but for
that you have to look inside and understand the entity, and that
takes us well beyond the semantics of HTTP.

Cheers,


Miles
Received on Wednesday, 27 March 2002 07:07:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 26 April 2012 12:47:05 GMT