3 ms·
The basics of designing any programming interface apply: Model your domain well, choose good names, try to make things as self-explanatory as possible. Assumin
by cnj 10y ago
The basics of designing any programming interface apply: Model your domain well, choose good names, try to make things as self-explanatory as possible.
Assuming you're tasked with doing a REST/JSON API, you should know both and be able to explain REST.
Some things depend on the consumer of the API. For example if you're applying for a position to build an API for a Mobile App company, they'll place a bigger focus on reducing bandwidth, number of calls etc. A single-page-app company may be interested in long-polling/WebRTC/... A microservice company may place bigger emphasis on asynchronous processing with webhooks or so.
Here is some advanced stuff that should "wow" someone (but, TBH, I wouldn't necessarily expect a junior dev to implement those):
* Instead of REST, implement a GraphQL API
* Document your API with Swagger/OpenAPI/RAML (+show some generated doc/client code)
* Implement a CQRS API
Good luck!
- ziggythesnake 10y agoYep, it's REST/JSON API. Thanks for the info.