
Integration Engineer at @Stripe I love all the #Javascript family: @reactjs @angular @typescript @nodejs
Paris, France
Joined December 2009
- Tweets3.1K
- Following583
- Followers227
- Likes3.5K
David Benchi retweeted
Problem: When you deploy a new version of your SPA, users with a tab open will keep using the old SPA code.
Yesterday, I shared one solution. People suggested dozens of useful variations and alternatives. 🙏
So, here are the best options in the massive thread.
6 ways to tell the SPA a new release is available, simplest options first:
1. Write the version from package.json into index.html as part of the build process. Poll index.html every x minutes and compare the server's index.html to the client's index.html.
2. Create an endpoint on the UI web server that reads the package.json version, and returns it. Poll this every x minutes. This is more efficient than option 1, because the payload is smaller.
3. Use web sockets or server sent events to push a notification to the UI after a deploy instead. This is especially attractive if you’re already using these technologies.
4. Use a service worker to notify the user when the UI is stale. For example, Vite's PWA plugin supports this.
5. Use an API proxy like Cloudfront to fetch the version without involving the backend. More here: rehanvdm.com/blog/using-a-cl…
6. Specify the app version in each HTTP call from the UI via a x-app-version header (or whatever name you like). Validate the x-app-version header on the API server. If x-app-version doesn't match the server's version, notify the UI in the response, either via an HTTP 205, 400, or 422 (the HTTP response you return depends on whether you want calls from a “stale” UI to succeed).
David Benchi retweeted
Another thing angering employees:
More new hires are joining the coming days/weeks. Klarna is reaching out to confirm to these new joiners that they are safe to join.
Rescinding offers: not cool. Klarna employees feel laying off tenured folks instead is worse though.
Rapid Event Notification System at Netflix by Netflix Technology Blog netflixtechblog.com/rapid-ev…
Microservices Database Management Patterns and Principles by @ezozkme link.medium.com/BAOmN8aWdob
1
I just read "Mac Setup for Web Development [2022]" by @rwieruch robinwieruch.de/mac-setup-we…
1
Patterns to know before migrating your monolith to microservices by @abhi_kapoor6 in @gitconnected levelup.gitconnected.com/pat…
"Git Cheat Sheet 📄 (50 commands + Free PDF and poster)" by @DoableDanny #DEVCommunity dev.to/doabledanny/git-cheat…
1
2
A must read article on #web3
@moxie >> Blog >> My first impressions of #web3 moxie.org/2022/01/07/web3-fi… via @moxie
10 Must-Have React Developer Tools To Write Clean Code dzone.com/articles/10-must-h… via @DZoneInc
Amazon’s Sr. Software Engineer at 27 — 8 important lessons I’ve learned so far in my career by Daniel Costa in @gitconnected levelup.gitconnected.com/ama…
It depends a lot on the business case you are facing to know if it will be worth using Micro-frontend architecture or not.
Business... Business... Business
apiumhub.com/tech-blog-barce…
"Advanced JavaScript Series - Part 2: Execution Context and Call Stack" by @Pranav046 #DEVCommunity dev.to/pranav016/advanced-ja…
"Advanced JavaScript Series - Part 1: Behind the scenes (JavaScript Engine, ATS, Hidden Classes, Garbage Collection)" by @Pranav046 #DEVCommunity dev.to/pranav016/advanced-ja…
Refactoring Legacy Code with the Strangler Fig Pattern shopify.engineering/refactor… via @Shopify
10 Best Practices Every React Developer Should Follow by Ravi Sojitra link.medium.com/MV9bp43Q1lb
Software Engineering Best Practices That High-Performing Teams Follow dzone.com/articles/software-… via @DZoneInc

