Writing a hypermedia app in Rust
This is the third post in a series: Writing safe hypermedia apps for a resource-constrained world, which introduces the series Writing a hypermedia app in Go this post Overview of the app # The example application in Hypermedia Systems is a simple CRUD application that manages a list of contacts. It illustrates how a Hypermedia-Driven Application can provide a good user interface as an alternative to single-page applications. With a tiny JavaScript library and some declarative attributes on HTML elements, all sorts of user interactions can fetch fragments of HTML from the server and update only certain parts of the page. For example, as we page through the list of contacts, or delete a contact from the list, the list changes without reloading the page.
Writing a hypermedia app in Go
This is the second post in a series: Writing safe hypermedia apps for a resource-constrained world, which introduces the series this post Writing a hypermedia app in Rust Overview of the app # The example application in Hypermedia Systems is a simple CRUD application that manages a list of contacts. It illustrates how a Hypermedia-Driven Application can provide a good user interface as an alternative to single-page applications. With a tiny JavaScript library (htmx) and some declarative attributes on HTML elements, all sorts of user interactions can fetch fragments of HTML from the server and modify only certain parts of the page. For example, as we page through the list of contacts, or delete a contact from the list, the displayed list is updated without reloading the page.
Writing safe hypermedia apps for a resource-constrained world
When I was developing web applications in the 1990s, it was common for the server to generate HTML pages using templates, and a lot of template engines were written for this (including one by me). Starting in the early 2000s, Single-Page Applications (SPA) became widespread. In an SPA, the server mainly returns JSON, and a JavaScript (or TypeScript) framework generates the HTML in the browser. I’ve worked on some applications like this, and it struck me that they’re cumbersome to maintain, partly because the JavaScript frameworks are huge and complex and change rapidly.
What makes a good extension language?
‘Scripting languages are designed for gluing’, wrote John Ousterhout, the creator of Tcl, in 1998.1 What Ousterhout had in mind was writing an application in a scripting language and having it delegate certain functions to components written in system programming languages. A similar idea inspired the wrapper generator SWIG, developed for scientific computing.2 Nowadays, Python is widely used in this way, thanks to its vast ecosystem of modules written in system programming languages.
Optimising PostgreSQL queries with an open dataset
Overview # This post is a brief illustration of some database optimisation techniques, using the BRÉF (Base Révisée des Élu·es de France / Revised database of representatives elected in France), which contains data about representatives elected in France from 1948 to 2020. The BRÉF is based on French public data, in which a team of researchers has corrected many errors and inconsistencies. It’s published as a PostgreSQL database that consists of several tables and offers many opportunities for joins and optimisations.