4 ms·
If Dropbox's API was RESTful would that save me any time using Google's competing API? If Dropbox's API was RESTful, you'd be able to use Google by only switch
by icebraining 11y ago
If Dropbox's API was RESTful would that save me any time using Google's competing API?
If Dropbox's API was RESTful, you'd be able to use Google by only switching the initial URL - which could even be configurable by the user, or auto-discovered from the website.
When you start playing with the APIs from lots of different cloud storage folks (Dropbox, OneDrive, Google Drive) you see that they vary widely in concepts and capabilities.
They don't vary _widely_ in concepts and capabilities, they add a layer on top of the same concepts (files, directories, upload/download, get public URL), and REST allows you to support generic and specific clients easily, by either using extensible or multiple media types.
Also Dropbox's old API was REST and it doesn't seem more portable
It resembled REST, but it wasn't. A good way to tell: if you need a documentation page with a list of all the URLs you can call, it's probably not RESTful.
- the_af 11y agoHow many APIs (and corresponding clients) do you know where "only switching the initial URL" is enough? I don't know many. Doesn't this require incredibly complex clients?
- icebraining 11y agoNo, it doesn't require complex clients. There aren't many examples because (1) most developers don't even understand the concept and (2) it reduces lock-in, which most providers aren't interested in supporting.
- the_af 11y ago> No, it doesn't require complex clients You really don't think that a flexible client which is able to discover resources and actions based only on an initial URL is more complex than one which is more hardcoded to a specific implementation and resources? I must be missing something, because to me, it obviously is. The obvious example of the Web and web browsers is not entirely convincing to me. Yes, browsers are flexible, but at the same time, the Web is an incredibly specific example. There are "hardcoded" expectations of what a web browser must be able to do, that I simply don't see in more general examples and use cases. And whenever we want to do something out of the ordinary with a web browser (I know, I know, "web browsers were never meant for that!") this general model of the web breaks down and we stray into wildly incompatible and hacky ways of doing things.
- steveklabnik 11y agoIt's not more complex, it's just different. Constructing URLs is more complex than just following them, for example.
- detaro 11y agoThe claim "just change the base URL and everything works" always seemed unrealistic to me. The relation names, the understood data-types, ... still have to be compatible, and IMHO that is the point where things would fail.
- icebraining 11y agoThose are the media types, which should be standard or at least reusable by others. The difficulty is not technical, it's economics: everyone wants to lock in their users, and this goes against that wish. When the conditions are right, you do see this: RSS/Atom is a good example.
- wstrange 11y agoIt is technical. Show me a general purpose program that can navigate, interpret and comprehend a variety of media types and I will show you an AI.
- icebraining 11y agoIt navigates the media types it has been programmed to handle. What part of that requires AI?
- detaro 11y agoWhy is that that much better than navigating the fixed relative URLs of a non-REST a client has been programmed to try?
- icebraining 11y agoSome advantages: https://blogs.oracle.com/craigmcc/entry/why_hateoas https://blogs.oracle.com/craigmcc/entry/why_hateoas But what I really see as the main advantage is the decoupling of server and UI, kind of like Android Intents on steroids. By using standard formats and dynamic routes between them, the user is no longer tied to a silo with a window through which they can interact with their data; they can know use his own chosen software to handle the different types of information, jumping through them as needed, without ever being locked-in to a particular provider. And for the developers, why are we building the same crap again and again using the API du-jure, when 90% of it uses the same concepts as existing software? Why do we need thousands of libraries and middleware that provides a "single API to many services"? We spend so much effort building these rickety integrations, just because the providers insist on using different names for the same things. Doesn't it abhor you, the waste of it all?
- andreineculau 11y agobingo! same thing I said in 2012 https://www.youtube.com/watch?v=Nh6VeuvVRdQ https://www.youtube.com/watch?v=Nh6VeuvVRdQ . Depressing that time passes, and nothing really changes.