Earlier quoted context omitted.
I was puzzled briefly as to what JavaScript was doing there but thinking about it I've been doing some stuff with google maps and the API for that is mostly done with JavaScript objects.
Probably talking about JSON and similar formats like JSON API.
REST API Alternatives
31–40 of 82 posts
Re: REST API Alternatives
#32the place where REST over HTTP fails badly IMO is batch operations and deep operations. when creating multiple entities at once, you cannot get back multiple location headers. and even if you could get back several headers, you have to re-request each of them via http to get their contents. it obligates you to be needlessly chatty. deep ops on multiple objects complicate things even further. i feel like once you get…
Re: REST API Alternatives
#331) Asynchronous APIs
There's nothing about REST that says that operations must be performed synchronously. If a client updates a resource via a PATCH method and other services are notified of the update via a web hook or a message bus (possibly including the PATCH or the full resource), the system is still following a RESTful design.
2) Orchestration / Experience APIs
A RESTful API does not need to require a separate GET for every individual resource. There's nothing wrong with implementing bulk queries that return variable projections of the server state tuned to the need of particular use cases.
Bulk modifications are trickier, especially when atomicity comes into play. But if atomicity is not a concern, then this is more of a transport problem, not a semantic one.
4) Binary protocols
Plenty of RESTful APIs (e.g., Twitter[1]) provide data in a number of payload formats. Choice of wire format is unrelated to whether or not the semantics of the API are RESTful.
[1] https://dev.twitter.com/docs/things-every-developer-should-k...
Re: REST API Alternatives
#34Re: REST API Alternatives
#35the place where REST over HTTP fails badly IMO is batch operations and deep operations. when creating multiple entities at once, you cannot get back multiple location headers. and even if you could get back several headers, you have to re-request each of them via http to get their contents. it obligates you to be needlessly chatty. deep ops on multiple objects complicate things even further. i feel like once you get…
I've used this approach for exactly the situation you're describing: batch operations that return multiple entities.
Re: REST API Alternatives
#36Its an OK article but I was really expecting to see some alternatives. I'm truly interested in something that compete with REST but was left wanting by the article.
A more productive discussion might have started with Ext.Direct or Dojo RPC, but even those are just complementary channels, not alternatives.
Re: REST API Alternatives
#37Somewhat related question I've been meaning to ask. Why isn't xmlrpc more popular? At least in python it's incredibly easy to set up and to consume.
Re: REST API Alternatives
#38Re: REST API Alternatives
#39I'm having trouble understanding the continual claiming that REST is not asynchronous - which I guess means that REST is synchronous. Saying it once would be a typo, but several times and I start to feel there is a distinct difference of opinion between myself and the author as to what constitutes a Restful architecture.
A typical RESTful API:
PUT new data to resource x/y/z
An asynchronous non RESTful API:
POST job information for resource x/y/z
GET status of job for resource x/y/z until status is complete.
GET results of job for resource x/y/zRe: REST API Alternatives
#40A number of these points are not really a criticism of RESTful principles per se, but rather of typical REST over HTTP approaches. 1) Asynchronous APIs There's nothing about REST that says that operations must be performed synchronously. If a client updates a resource via a PATCH method and other services are notified of the update via a web hook or a message bus (possibly including the PATCH or the full resource), t…
This is very much different than the normal REST philosophy of returning only homogeneous results. Much more RPC-ish.