--
You received this message because you are subscribed to the Google Groups "Hypermedia Web" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hypermedia-we...@googlegroups.com.
To post to this group, send email to hyperme...@googlegroups.com.
Visit this group at http://groups.google.com/group/hypermedia-web?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
M
I love watching this thread on two different lists. I should have split up my reply and put the other half here. :)
be sure to include things you mentioned like "network effects", "adoption", "retention", 'ease of use", "time-to-build", etc. Twillio has some interesting things to say on this.
Would love to read that, if you have (a) link(s)?
--
yeah, i knew when i wrote that that i'd need to dig back to find my links.ATM i can't (booo)this is one that i had on hand:toward the bottom is where the API Evangelist and things start to come into play. You can hit up Keith Casey directly (https://twitter.com/CaseySoftware) and he'll give you a great story on this.once i get my materials together, i promise to post more.
On Apr 4, 2013 2:00 PM, "mca" <m...@amundsen.com> wrote:
>
> However, if you control all the code (client and server), can manage change
> mono-lithically (no need to co-operate w/ other stakeholders), and have a fully
> coordinated deployment model ("we'll be down saturday night while we deploy the
> new updates") then HAPIs are proly not much of a benefit.
I wonder if this undersells the benefits of hypermedia a bit. Aren't you effectively suggesting that in many situation it is appropriate to tightly couple at least two layers of the architecture? This is, of course, potentially true but when we say something like this about software design we usually preface it with some point about the dangers of premature optimization and follow it with a reminder that the listener almost certainly doesn't have the kind of performance problems that would require such a dramatic and costly solution. As an industry we have found that loosely coupled, highly cohesive modules are usually preferable. Given that hypermedia APIs tend to reduce coupling between the client and server should we hedge quite this much?
Peter
Barelyenough.org
Ps: Ime, the reduction in connasence provided by hypermedia has been well worth the cost even on projects where my team owned both the client and server and could change them in lock step. Clean, loosely coupled interfaces just make maintenance less costly. That that goes double if the interface is between code bases, languages or even processes.
Fwiw, my experience is basically the same.
I think the cost benefit wrt m2m does depend quite a lot on how easy it is to write code that interacts with the hypermedia controls you're introducing, and how that weighs up against the degree to which each of those controls actually reduces connasence for the type of evolvability challenges that need to be overcome _in practice_.
For example, many form-like hypermedia controls in existing types don't really solve any serious m2m challenges I've seen since they merely shift connascence of name into the client's interaction with the form but don't actually reduce it in any way.. The clients are now just coupled to the names of the inputs in the form instead of , say, the names of the json properties in the request. Yes the values in the resulting request body can be renamed, but ime being able to change this is not hugely important. At least not important enough to make the clients incur the cost of jumping through a hypermedia-form-submission hoop.
To put it another way.. from a developer-writing-a-client's point of view; adding a form control means she goes from figuring out what json properties she has to POST, to figuring out what form inputs she needs to submit (between which there's no real difference).. Oh and she also now is forced to implement non-trivial code for correctly interacting with a form control.
That's a tough sell. Its definitely not a good user experience. Its the kind of thing that can lose you customers.
This is in contrast to the use of simpler controls like links and templated links which actually do reduce costs for clients - no coupling to uri patterns, no uri construction logic. They also afford the server to enact granular evolution of the api where breaking changes and new features can be introduced seamlessly simply by adding a new link.
But hey, I would say that because its the justification for why hal+json is the way it is! :)
Cheers,
M
--
In our case, we offered a thin client library that handled extracting HTML microdata, finding links, submitting forms, etc. Given this interface, the fact that the underlying transport is HTML is largely hidden, and in fact the APIs become very easy to work with.
I gave a talk at QCon London recently about this experience:
http://qconlondon.com/london-2013/presentation/Building%20Hypermedia%20APIs%20with%20HTML
The video should be available after June 17:
http://qconlondon.com/london-2013/videos
In that talk I used a demo Python client library of this general form, which I've (just) gotten approval to release as open source. I'll be sure to post a link here once I get it up.
Now, an interesting vignette: after the experience of building and operating our first HTML-based API, the API team was very excited to use these concepts for their next project, which was meant to power mobile client apps. The iOS team fairly flat out refused to even try an HTML-based API, demanding JSON. Since we wanted to ship software more than we wanted to argue, we decided to use HAL+JSON instead.
That has generally worked out well, although we have found we've had to "reinvent" certain features HTML provides--figuring out how to achieve the same thing in HAL (URL fragments to point to inner parts of responses being a good example). The mobile client teams have become more comfortable with the idea of hypermedia APIs in general, though, and the last time I ran into the iOS tech lead he opined that if he had to do it over he would have preferred an XHTML representation. Quite a turnaround.
While I do think HTML makes a ton of sense for hypermedia APIs, I think this is a "point in time" assessment. The community is actively working on JSON hypermedia formats and I do not debate that it is easier to work with parsed JSON structures than the DOM of parsed HTML, so I think we'll see that come to fruition. In my experience, though, I'll need a JSON format that provides all of the following before I'd switch my recommendation:
(a) support for semantic annotations, e.g. microdata, RDF, etc.
(b) support for interior representation links
(c) support for embedded or remote properties
(d) support for links
(e) support for forms [1]
(f) good browser tooling (could be plugins)
Jon
[1] I think that URI templates aren't solely sufficient, as sometimes you want to construct an HTTP request that POSTs (or, if we get our way with the HTML spec, PUTs) to a specific URI where the inputs are carried in the body, primarily for cache invalidation reasons.
________________________________________
From: hyperme...@googlegroups.com [hyperme...@googlegroups.com] on behalf of Jason Erickson [jason.h....@gmail.com]
Sent: Monday, April 08, 2013 4:18 PM
To: hyperme...@googlegroups.com
Subject: Re: Are Hypermedia APIs appropriate for all domains?
We've built an HTML-based API are are using it in production, and I think you have definitely touched on some pain points.
In our case, we offered a thin client library that handled extracting HTML microdata, finding links, submitting forms, etc. Given this interface, the fact that the underlying transport is HTML is largely hidden, and in fact the APIs become very easy to work with.
I gave a talk at QCon London recently about this experience:
http://qconlondon.com/london-2013/presentation/Building%20Hypermedia%20APIs%20with%20HTML
The video should be available after June 17:
http://qconlondon.com/london-2013/videos
In that talk I used a demo Python client library of this general form, which I've (just) gotten approval to release as open source. I'll be sure to post a link here once I get it up.
Now, an interesting vignette: after the experience of building and operating our first HTML-based API, the API team was very excited to use these concepts for their next project, which was meant to power mobile client apps. The iOS team fairly flat out refused to even try an HTML-based API, demanding JSON. Since we wanted to ship software more than we wanted to argue, we decided to use HAL+JSON instead.
That has generally worked out well, although we have found we've had to "reinvent" certain features HTML provides--figuring out how to achieve the same thing in HAL (URL fragments to point to inner parts of responses being a good example).
The mobile client teams have become more comfortable with the idea of hypermedia APIs in general, though, and the last time I ran into the iOS tech lead he opined that if he had to do it over he would have preferred an XHTML representation. Quite a turnaround.