3 ms·
It’s a good posting. I do many of these things, but not all. I’ve been designing SDKs for a long time; APIs, for a somewhat shorter time. I don’t like “pure”
by ChrisMarshallNY 5y ago
It’s a good posting. I do many of these things, but not all.
I’ve been designing SDKs for a long time; APIs, for a somewhat shorter time.
I don’t like “pure” RESTful APIs, because I feel as if they are “human-hostile.” I tend to follow the patterns set by companies like Google, where the stimulus is a fairly straightforward URI (with parameters, as opposed to a block of XML or JSON —if possible, as I know that we often still need to send big data as transaction data, which can be a pain, depending on the method), and the response is a block of structured data. That also makes it a lot easier for API clients to build requests, and allows the server to “genericize” the processing of requests.
> 10. Use standardized error responses
Is something I do, along with a text header payload, describing internal information about the error. It is my experience that this text payload is never transferred, and I am forced to send a text response via the body, if I want to know internal information. That can be a pain, as it often breaks the transaction, so I have to play with the server and client, frequently, using a cloned server instance.
I should note that my forte is not backend development, so the chances are good that I am not familiar with all the tools at my disposal.
- thatwasunusual 5y ago> I tend to follow the patterns [...] Can you elaborate on this? Give examples?
- ChrisMarshallNY 5y agoI don’t feel like doing that in a comment, but feel free to check out some of my work. The BAOBAB server[0] is one of my more recent examples. I’m using a modified version as the backend for the app I’m developing, now. It works great. I should note that the BASALT layer uses “plugins,” that can be extended to include “pure” REST APIs. I just haven’t found these practical, for my purposes. [0] https://riftvalleysoftware.com/work/open-source-projects/#baobab https://riftvalleysoftware.com/work/open-source-projects/#ba...