iframe { display: block; margin: 10px auto; } My UtahJS talk, "Building the Hundred-Year Web Service", was put online this week! It's about how to build software infrastructure that lasts a very long time. If you're not a software engineer (very unlikely that you're reading this blog if so, but it's possible) the first 11 minutes of the talk...
It's been two years since I wrote my first production webservice with htmx. Two years is not a very long time, but early indicators suggest that the software projects I've written with htmx are a much better experience for users, and orders of magnitude easier to maintain, than the software projects they replaced. They are likely to remain useful...
A couple months ago I was sitting next to Ivy Wong and I saw them working on a dropdown menu so cute that I immediately asked how they did it. It looked something like this: ul.base { list-style-type: none; margin: 0 auto; padding: 0; width: fit-content; } .base li { background-color: bisque; border: 2px black solid; margin: 5px...
While I'm not going to settle the Single-Page Web Application (SPA) debate in a blog post, there is one claim about SPAs that routinely goes unchallenged, and it drives me nuts: that users prefer them because of the "modern," responsive feel. SPAs achieve their signature feel using partial page replacement: adding or removing DOM elements instead...
iframe { display: block; margin: 10px auto; } This past weekend, I gave a talk entitled "The Life & Death of htmx" at Big Sky Dev Con. Summary The thesis of the talk is that, with 30 years of real-world usage evidence, we have a clear understanding of HTML's limitations as hypertext, and with just three small additions to HTML, we can address...
The Classic Hello World Here's how you make a webpage that says "Hello World" in PHP: Hello World Name that file index.php and you're set. Awesome. Version 1 of our website looks like this: Okay, we can do a little better. Let's add the HTML doctype and element to make it a legal HTML5 page, an header to give the "Hello World" some heft, and a ...
The comment I received most frequently on "Behavior Belongs in the HTML" was: "don't Web Components solve this?" Web Components aren't an interface. They are... well, a lot of things, including: the Shadow DOM, HTML templates, and a bunch of JavaScript APIs. But if what you mean is "custom elements," then the answer is no. If you want to...
When you click the button below, it's going to show you a little message. Click me Showing a pop-up when the user clicks a button isn't something the button supports on its own; you have to code it. There are two ways to attach custom functionality to an HTML element: inline, or using an event listener. This is how you'd do it with an inline...