Yesterday, we looked at two different ways to build more resilient websites and web apps. Today, let's talk about how to add dynamic user interactions to static HTML. Let's dig in! Most of what we build is formsWhile there are clearly exceptions to this, a lot of the dynamic stuff we build is really just forms and server reloads. For example, my Lean Web Club coaching platform features buttons that users can press to bookmark tutorials or coding resources for quick access later. Here's how I make those fast, resilient, and easy to maintain as a developer. The default experience is a
When the user clicks the button, the The server updates the user's bookmarks using the information from the No JavaScript is needed at all, but… I can make the experience a lot better with it. The whole
I had previously been handling this whole interaction entirely with JavaScript. This new setup is faster, requires less code, is easier to maintain, is easier to reason about as a developer, and is less prone to breaking. Progressive enhancement doesn't have to be hardI often hear that progressive enhancement like this requires developers to write the same code twice. It doesn't. Most the dev work happens on the server. Most of the client-side patterns are similar: intercept a It's made my developer life so much easier. I can help your team get there, too. Cheers, Want to share this with others or read it later? View it in a browser. |
0 Komentar untuk "[Go Make Things] A simpler way to build dynamic user interactions"