Re: Code generation or forms?

On 15 Jun 2005, at 04:48, Mark Baker wrote:
>

> In PyAmazon[1] for example, I see code which basically hides the HTTP
> interface from a developer behind a custom API of "browseBestSellers",
> "searchBy*", and "searchSimilar" operations.

Agreed, and that could be how some people want their generated code
to work, but there may be other ways of abstracting, or not the API.

> While this API may very well be useful for developers, it's not
> something that a service
> provider will provide, since they have no stake in what particular
> local API any consumer of their service uses.

It's a strong goal that the service should have no interest in the
technology choices made by the suppplier, however, in the example
APIs I cited earlier, all provide task oriented patterns of use.
A good example might be the flickr 'upload a photograph' [2] or
del.icio.us 'post a link' [3]. It's up to the consumer if
task => python function, javadoc page, Submit Button or whatever.

Would you be happy if a description language didn't use
the word 'operation' but, say 'pattern' or 'task' and gave those
patterns non-symbolic names, e.g. 'add a link' rather
than 'addLink'?

Or are you heading towards having nothing more than a list of the
resources available, and an assumption that all the HTTP verbs
can be applied to each resource? If so, that's less than the
current simple HTTP API publishers already provide in their
English descriptions.

> I mean, I assume that instances of this description language we're
> talking about, would be something that service developers would 
> publish,
> right?

That's how I'd imagine it, however there is nothing to stop me
writing a flickr WADL based on their English descriptions and using it
in the comfort of my own home for purposes I see fit. All will be well
so long as I follow the patterns they describe when interacting with
their site.

> [1] http://www.josephson.org/projects/pyamazon/

Paul
--
http://blog.whatfettle.com

[2] http://www.flickr.com/services/api/upload.api.html
[3] http://del.icio.us/doc/api

Received on Wednesday, 15 June 2005 07:43:38 UTC