Re:Writing HTML with Racket and X-Expressions (2019)
by soegaard on Thursday April 02, 2020 @05:44AM
(#22757473)
Generating HTML is a common task. Over the years we have seen multiple approaches in the Racket community. Representing HTML as S-expressions is common. There is even two approaches in use `xexprs` and `sxml`.
There are other solutions, such as representing HTML as structures (often called records in other languages). This is what I prefer - this allows a little static checking. (See `scribble/html` or `urlang/html`).
Others prefer to work with `templates`.
My point got lost: There is more than one "Racket way" of working with html.
There are other solutions, such as representing HTML as structures (often called records in other languages). This is what I prefer - this allows a little static checking. (See `scribble/html` or `urlang/html`).
Others prefer to work with `templates`.
My point got lost: There is more than one "Racket way" of working with html.