Complete Developer Podcast
API Anti-Patterns

API Anti-Patterns

Complete Developer Podcast

50:58

About this episode

APIs are a huge part of development today and one of the most common types of API out there is a RESTful API. REST stands for representational state transfer, which is a software architecture that imposes conditions on how an API should work. Essentially, it was created as a set of guidelines for how communications should work between disparate systems on a complex communication network (like the internet). REST is implemented atop HTTP and uses the standards in the underlying protocol as part of the standards for communication. In a RESTful API, client and server applications are considered to be independent, that is, details from one should not leak into the other, to the extent possible. This also implies that API calls for the same resource should look the same regardless of where they come from – indeed this is required to decouple the client and the server.

RESTFul APIs are built around the inherent statelessness of HTTP. That is, a persistent connection between the client and server is not assumed. This has profound architectural implications in regards to how resources are accessed and mutated. In order to make this disconnected architecture perform well across the internet, this also means that caching will be used heavily. Caching implies further architectural constraints around resource access, as well as careful coding server side to ensure that items are cached (and removed from cache) appropriately. This helps both client side speed and server side scalability. In addition, the lack of a session makes it far easier to spread a workload across multiple servers, as there is no need to synchronize state between them or keep sessions sticky.

Restful APIs are pretty much bog standard web technology at this point. Not only do complex frontends use them, but clients, QA, and other parts of your own system will often do so as well. While Rest APIs are generally standard at this point, there are a lot of mistakes you can make when designing them that make it harder to use your API, create excess load on the server, or just generally increase the frustration level of all involved parties. Certain antipatterns also look good initially, but end up causing problems later when your system gets more users, or more HTTP savvy integrators working with it. We hope this brief overview is enough to save you some time up front on your next API project.

Links
Join Us On Patreon
Level Up Financial Planning

The post API Anti-Patterns appeared first on Complete Developer Podcast.

Hosted on Acast. See acast.com/privacy for more information.

More from Complete Developer Podcast

Podcasting has definitely been a journey for both of us. When we started BJ wasn't even a developer and Will was working for himself. Now 8 years later BJ is leading a team of developers and Will is b…

1h 1m

Simple systems fail simply. Complex systems also fail simply, but their interconnectedness with other systems makes mitigating failures much more complex. Past a certain level of complexity, system fa…

40m

SMART Feedback

Feedback is any information, observation, or even opinion about the performance or behavior of another individual our group. It can be formal as in performance or peer evaluations or informal such as…

44m

Database Sharding

Database sharding is a process of storing a large database across multiple machines. Because a single machine can only hold and process so much data, eventually some systems will scale beyond the abil…

51m

Effective communication is a vital aspect of any organization or team's success, and one tool that has been proven to be very useful is the Four Square Report. This report is a simple and effective wa…

36m