News for hackers. Stuff that matters.

jon_moore

Re:JSON API on Monday May 06, 2013 @05:16PM (#5664836)
N.B. Pipelining can be used for any idempotent request (so PUTs and DELETEs work too). That said, lack of broad implementation support for pipelining is still an issue. Since HTTP/2.0 is being based on SPDY, hopefully we'll see a day where this is less of an issue.
Re:When REST isn't Good Enough on Tuesday November 27, 2012 @10:05PM (#4840799)
I'm pretty sure Google's home page doesn't include every possible search term for you to select from, and that's a perfectly RESTful example of an exposed function (search). Forms are a very powerful hypermedia construct.
Re:When REST isn't Good Enough on Tuesday November 27, 2012 @10:02PM (#4840789)
GET /cityDistance?city1=Chicago&city2=Austin

Also, while POST can mean "create", it can also mean "append" or "process some arbitrary request."

Re:Using HTML as the Media Type for your API on Wednesday July 11, 2012 @06:49PM (#4231876)
I think it's somewhat of a benefit to make the clients expect to do a little searching to find the data/links/forms they want to use--it makes them a little more robust and adaptable (I guess because they have lowered expectations!). Contrast this to a client dependent on an XML or JSON Schema. Yeah, that client is easy to write, but you've now locked the server into not changing its format or you've doomed the client to break when the server decides to change anyway. I'm shooting for something a little better.

You can't totally decouple the clients; they have to understand in some way the vocabulary the server is using, but you can do a lot to decouple them from the structure of the markup.

Re:Using HTML as the Media Type for your API on Wednesday July 11, 2012 @06:45PM (#4231862)
A lot of Mike Amundsen's work you've listed here is a direct inspiration for this article. Thanks, MCA!
Re:Using HTML as the Media Type for your API on Wednesday July 11, 2012 @06:44PM (#4231858)
Yep, this is really the point. If we think hypermedia APIs give you evolvability, then we've got to figure out how to do it; we don't have libraries for that sitting around, so someone has to do some work somewhere.

HAL is going for "start with something clean for machines (JSON and XML), layer in hypermedia, get people to adopt it." This seems like a perfectly reasonable approach.

I'm suggesting another approach, which is "start with something that supports hypermedia and is already ubiquitous on the web, and figure out how to get machines to make sense of it."

I'm not sure either one is easy, so it's worth having multiple horses in the race, I think.