HTML event handlers are those onxxx attributes and properties many of us are used to, but do you know how they actually work? If you're writing custom elements and would like them to have such event handlers, what would you have to do? And what would you possibly be unable to implement? What differences would there be from native event handlers? Before diving in: if you just want something usable,…
Built-in HTML elements' properties all share similar behaviors, that don't come for free when you write your own custom elements. Let's see what those behaviors are, why you'd want to implement them in your web components, and how to do it, including how some web component libraries actually don't allow you to mimic those behaviors. Built-in elements' behaviors I said it already: built-in…
Earlier this month, Stefan Judis published a small web component that makes your text sparkle . In the spirit of so-called HTML web components which apparently often comes with some sort of aversion for the shadow DOM , the element directly manipulates the light DOM. As a developer of web apps with heavy DOM manipulations, and lover of the platform , this feels weird to me as it could possibly…
This article's goal is to present what JWTs are, whenever you face them. As we'll see , you won't deliberately choose to use JWTs in a project, and more importantly: you won't use JWTs as session tokens . What is it? JSON Web Token (JWT) is a compact, URL-safe means of representing data to be transferred between two parties. The data is encoded as a JSON object that can be signed and/or encrypted.…
There are many blog posts floating around about “adding authentication to your application”, be it written in Node.js, ASP.NET, Java with Spring Boot, JS in the browser talking to a JSON-based Web API on the server, etc. Most of them handle the login page and password storage, and sometimes logout and a user registration page. But authentication is actually much more than that! Don't get me wrong,…
I've been using Git for a dozen years. Eight years ago, I had to give a training session on Git (and GitHub) to a partner company about to create an open source project, and I'm going to tell you here about the way I taught it. Incidentally, we created internal training sessions at work since then that use the same (or similar) approach. That being said, I didn't invent anything: this is heavily…
Next week, Julia Evans published on her blog about confusing git terminology . This is an awesome post but not all explanations resonated with me so I thought I'd write my own version (or rather, add my own notes) in case others felt the same (Julia, feel free to cherry pick from here to your blog 😉). I'll also reorder them to make it easier to cross-reference without you having to jump around.…
When talking about software ecodesign, green IT, climate-friendly software, the carbon footprint of software, or however you name it, most of the time people focus on energy efficiency and server-side code, sometimes going to great length measuring and monitoring it. But what if all this was misguided? Ok, this is a bit of a bold statement, but don't get me wrong: I'm not saying you shouldn't care…
During the past few months, social networks have been shaken by a single-page vs multi-page applications (SPA vs MPA) battle, more specifically related to Next.js and React, following, among other things, a tweet by Guillermo Rauch and a GitHub comment by Dan Abramov . I've read a few articles and been involved in a few discussions about those and it appeared that we apparently don't all have the…
Yes, this is going to be yet another one of those articles explaining how I migrated this blog from Jekyll to Eleventy . You've been warned. Why? I don't really have issues with Jekyll and I've been using it for 10 years now here, but I haven't really chosen Jekyll: it's been more-or-less imposed on me by GitHub Pages. But GitHub now has added the possibility to deploy using a custom GitHub…