Net API Notes for 2020/05/19 - Issue 130

In the DC area, spring is fully underway. Despite feeling stuck in a loop due to the self-isolation, the changing weather is proof I didn't stumble into a Groundhog's Day scenario. More proof? There have been new posts worth checking out posted online. Let's get to the notes!



If you're like me, you might have noticed a steady uptick in arriving on a site only to be greeted by a spinny wait indicator. The site then "pops" into view shortly after that, with nary a progressive enhancement to be found. If so, you've just had a portion of your waking life stolen by a poorly optimized Single Page Application (or SPA).

SPAs are when a site's bits and bobs are constructed entirely in the client. They would not be possible without APIs, and Javascript frameworks, like React, have made them incredibly popular. Tom MacWright noticed this rise, along with the problems that came along with them. That lead him to write "Second-guessing the modern web".

The piece covers a considerable amount of ground. Of interest to this crowd, however, are his observations on how SPAs tend to distort API design. For example, developers will drift to "one query per page" design to avoid making multiple calls; the "chatty" API boogeyman. React implementations also tend to appear with GraphQL, another idea that originated with Facebook. Tom has some fascinating critiques of GraphQL in this situation, as well.

What's a developer to do? Well, as a reminder that everything old eventually becomes new again, I see increased mentions of "server-side rendering". While I'm gleefully blowing the dust off my web design tomes from the aughts, the reality is that we probably need a balance of the two.


There are scads of articles, particularly around API product thinking, that encourage "user-centric design". But what does that mean? And how does someone that trends heavier on the engineering persuasion get started?

Stephen Fishman offers some clues in a piece entitled "Why designing an intentional API consumer experience starts with the users". The main attraction is his overview of how to use user-types and personas.

Before you go thinking that this is only for external APIs, I'll remind you that internal developers benefit from better design, as well. Start creating some of these artifacts on your next API project, and the time spent upfront will be paid back tenfold over the life of the project.SEGEMENT TRAVELS FROM MICROSERVICES AND BACK AGAIN

Alexandra Noonan recently shared how Segment went from a monolith to microservices and back again (the QCon slides are online). Thomas Betts did an excellent job recapping the presentation on InfoQ.

The tale starts as many of them do:

  • The team started creating microservices when the division of labor was simple, and the operational overhead was manageable.
  • A period of growth ensued, and the number of independent code bases resulted in different behaviors for common actions; small at first, but a more significant drag on velocity as time went on.
  • Shared libraries were created for service commonalities, but this caused a new bottleneck, mostly due to testing constraints. Having to manage versions (and getting people to upgrade to new versions) was draining.

Hopefully, a recording will appear online at some point. It sounds like it was a thoughtful presentation. In the meantime, Noonan also participated in an online panel discussion, "Microservices - Are They Still Worth It?".



Have you been to yet? While physical events may have paused, virtual events continue to spring up. I've tried to track the ones relevant to our space to the site. However, if you know of an upcoming API-related community gathering that isn't listed, I want to know! I'd be glad to list it.

Finally, thank you to the Patreons who continue to assign a value to this humble endevour. That little bit of signaling, month after month, means a lot.

Till next time,

Matthew @libel_vox and

Subscribe to Net API Notes

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.