I’m happy to announce the first good release of Purview. By good I mean I found myself having a good bit of fun writing a website with it.
The features, which are an assortment of things I’ve found nice across the ecosystem:
Side-by-side styling for HTML
State can be broken apart into smaller units, although you can still Elm it up and have one large event handler at the top
Server side rendered
Easy access to IO in handlers, with changes always run in green threads to avoid blocking
Type safe events
Reasonably simple interop with Javascript
Basic hot reloading via ghcid
My focus has mostly been on the ergonomics of use, so it’s still missing plenty and performance has not been considered at all. One aim was to be able to call an existing library of code easily and get a website going quick!
To accompany this very alpha framework, there’s a very alpha website. And, of course, the github.
I’d love to hear your thoughts and feel free to message me
Right now I don’t think it’s possible to use another HTML library but it’d be interesting to see what it’d take to allow that. Blaze-html is something I’m looking at moving all the behind the scenes HTML construction in Purview to for speeed.
And to answer your question about the hot reloading, yep it’s just using ghcid to restart the process on changes. Purview will then re-request the page on reconnection when you have devMode set to True ala
main = serve defaultConfiguration { devMode=True } yourComponent