If his solution works, and is widely adopted, then he will revisit and add all those things that the OP mentions, but right now he is just trying to get something working.
An SDK is great for that.
When I build an app that needs to consume some REST API, if the REST API provider doesn't already provide an SDK, I'll create my own in each programming language that is useful to me (Objective-C to build an iOS app; Java to build an Android app; etc). To me its the logical thing to do, especially if I intend to create more than 1 app that consumes the REST API in the same language (iOS POC app 1, iOS POC app2, ...).
However, creating your own SDK is pretty much what the OP suggests--it gives him the level of control that he needs.
I certainly don't want to dissuade companies from writing SDKs. They're great products and really help in getting people much needed traction as quickly as possible. For the GA of the new Heroku API we'll be shipping SDKs in as many languages as we can support!
Why can't we all just get along?
I think it's great for someone to say:
"Hey guys, I find it fits in my workflow really well to not use SDK's, and I
feel I get a lot of benefit from it."
I think we'd all agree that a similarly toned response would be great: Interesting approach, thanks for sharing why you do things that way. If I
may chime in as someone who designs these SDK's, we really target them
towards people who have less experience, and who need simpler tools to get
things done. We'd counsel everyone to keep this in mind when picking tools
to use for their projects. Remember, always be thorough in exploring your
options and choose the best tool for the job!
See how nice that could have been, for both parties? I don't think we benefit from titles that come across as vaguely hostile like "Why I Don't Want Your SDK in Production", or from responses that might be interpreted as overly dismissive like "That's cool. You're not the guy we built it for".I am conscious that this post might come across as condescending or insulting, but I'm genuinely not trying to go for that. I like hearing the different opinions people have, and it bothers me that there's such low level hostility and tension in much of the discussion I see. I hope we can all be a little nicer when we talk online.
Seriously, we can all get along!
I'll admit that my original title was somewhat linkbait-y and fully respect the moderator's decision to amend it. That said, while the title was designed to incite discussion (and there is disagreement in a good discussion), I hope that the article's actual content conveys the intended respectful tone. Let me know if it doesn't.
Have you considered that maybe an API should be callable using `jQuery.ajax(...)` or a simple `application/x-www-form-urlencoded` POST?
(...or was this satire?)
I'm referring to API calls that you really really only want to ever do from your server. Things like starting and stopping EC2 instances, where you need to send along your API keys that are essentially the keys to your bank account and your business's future survival.
Now imagine, as the owner of that service, that your customer is sending those keys in plain text to the client, and wondering why he's having a hard time starting EC2 instances using javascript from his user's browser.
I have trouble thinking of any API that shouldn't be callable from a client.
Clearly the keys need to be obtained somehow, but that was out of band for my application. Once they are obtained I don't see any reason why passing them from a 3rd party app over HTTPS (using CORS) is any less secure than using session based authentication with a 1st party app.
In both cases you are vulnerable to MTM and XSS attacks. Sessions expire which is nice, but that's the only real difference.
We built that SDK so that Junior Dev Jimmy can make calls to our API and actually finish integrating our service without giving up. That guy can't code his way out of a paper sack, and certainly couldn't successfully send us an HTTP request or parse the result that we sent back. We built him a client library so that he'll stop sending us stupid emails asking how to call our server-side API using jQuery or, not making this up as it's happened several times from several customers, a form on an HTML page.
Anything we can do to get that guy up and running and done implementing our API, we'll do. Because the guy who hired him is paying us money, and the last thing we want to do is explain why he needs to fire his only developer and find a new one.