5215 words / 13 links / 6 images / 18 snippets
As a pastime project last year, I rewrote two non-trivial web applications in
Halogen; some patterns eventually emerged. I believe these patterns haven’t
been documented thoroughly, particularly in the realm of pure-functional
programming and web-application. I now architect my PureScript application in
Halogen with a form of Entity-Component-System with one-main-handler loop. I
organize page sub-components into Widgets, and Bricks. Widgets and Bricks play
a similar role, but we can distinguish between them by discriminating the
component on whether we map or contra-map their events into the Page events.