5 ms·
Author here. I definitely understand the thought process that went behind dropbox's decision, and which arguments got the most weight. It must have been pragmat
by treve 12y ago
Author here. I definitely understand the thought process that went behind dropbox's decision, and which arguments got the most weight. It must have been pragmatic and valid design within the design considerations they valued the most.
The other suggestions I gave will for some people largely be an academic. But for the people that do strive to build a more RESTful service and do see the point of doing so, or for the people that want something that takes better advantage of the standards, I wanted to present a few alternative ideas.
Whether those are right for you are highly dependent on the situation.
What I meant with "don't break the web" comes down the fact that using SOAP, RPC or whatever take advantage of some the technologies that came with the web, but forgo the ability to for example link to the data that these services provide. Soap uses HTTP as a transport mechanism, but I wouldn't really call it part of the web.
- mythz 12y agoYour headline of "...this is poor API Design" is clearly not written as here's a "REST-ful alternative to using POST for large queries". There's a strong case for taking advantage of every technology at your disposable to deliver the most compelling value and end-user experience possible, as-is the trait/focus of successful companies (ala DropBox). And how exactly is REPORT better for linkability? Why is being able to link a 8kb QueryString more important and worth sacrificing over all other end-user features/qualities for? and what are other examples of "breaking the web"?
- treve 12y agoREPORT definitely still has the linking problem. REPORT only solves the issue that POST is unsafe/non-idempotent. This is just a marginal improvement, and would not qualify as restful. The 'creating a query resource' would be an option for those that do want a linkable resource. Why linking is important? I don't think I can quickly sum that up in a comment, or properly do it justice. If you're genuinely interested I would be happy to look for and suggest a few resources that do a much better job than I ever could. Regardless, I don't believe that HATEOAS/RESTful design is the be-all and end-all. I think certain web api's are particularly well-suited for it, but it's a type of design that is not appropriate for every problem.
- modarts 12y agoOh man, I love ServiceStack and have built some incredible API's on it. Just wanted to say thanks :)
- WhitneyLand 12y agoThis is exactly the kind of design that creates overly complex software. It's design for the sake of purity rather pragmatism. Some guy like Roy Fielding proclaims the "right" way to do things and developers end up doing backflips to accept the dogma. Dropbox is correct in this case, and this would make a good interview question to see what kind of engineers you are about to hire and what the long term impact will be on your code base.