Lucas DiCioccio's Blog - How I write PureScript web-apps

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.

@lucasdicioccio @RosaCtrl Oooh, I love all the handwavy parts trying to find mappings between code structure and page structures.

It's central to the way I think when coding and I have trouble explaining it to other people

@clementd @RosaCtrl

There are two classes of people: those who have met recursion-schemes and those who have not.