Lorenzofox's dev blog

Hi! I am Laurent and this is my dev blog. This is where I collect what I learn, what I experiment and what I find interesting.

Latest articles

Template engine with streaming capability - part 2/2

First publication date:

In we built a template engine that supports streaming. Unfortunately, it did not perform very well when rendering a test page (a blog home page) compared to other popular libraries. In this article, we will look at several techniques that will lead us to a more efficient implementation.

Read article

Template engine with streaming capability - part 1/2

First publication date:

Browsers can render HTML on the fly as chunks of text arrive. This is called HTML streaming, and it is not new. I recently read Chris Haynes' article explaining how you can stream HTML out of order (OOO) without JavaScript. This opens up a lot of possibilities and new patterns at low cost. However, I have not found much in the way of simple yet efficient template engine libraries with streaming support. Let's build one!

Read article

Let's build a UI framework - part 2/2

First publication date:

seems complete and well thought out. We went through the process of building on top of a solid foundation. This is how most software is written these days, but we suffered from the common bias and added unnecessary complexity. Here we will see how removing components can actually be better.

Read article

Batch component updates with micro tasks

First publication date:

In the , we finished by providing a function to convert a generator into a custom element. In this post we will iterate by adding reactive attributes to our component definition, and ensuring that updates are performed in batch, using the hidden gem queueMicrotask.

Read article

Coroutines and web components

First publication date:

In the we learned what coroutines are and saw some patterns they can help implement. In this article, we will see how coroutines can be used to model web components in a different way, and why you might like it.

Read article

Coroutines in Javascript

First publication date:

A coroutine is a function whose execution can be suspended and resumed, possibly passing some data. They happen to be useful for implementing various patterns involving cooperation between different tasks/functions such as asynchronous flows for example.

Read article