Hooking one or more Elm single-page apps into Phoenix

I’m building an app that will be, on the client side, a combination of plain HTML and N single-page apps. It took me some time to figure out what Javascript to inject into the end of my layout such that - on the SPA pages - the appropriate Elm app would be launched into the appropriate <div>.

When I got it all wired together, I wrote a blog post. Hope it’s useful.

6 Likes

Are you intending to blog about this particular design decision?

I personally like the idea of smaller separate applications, each centered around a particular resource or context rather than stuffing everything into one super page application. However when I looked into it I quickly came across opinions like Mixing MPA and SPA: worst of both worlds which seems to be well represented - of course that doesn’t stop others like AngularJS and Multi Page Applications.

For the time being MPA seems be an ambiguous term that unfortunately many use to mean multiple (server-side rendered) page application - even though I think MPW (multi-page website; from The disadvantages of Single Page Applications) seems more appropriate for traditional websites.
(Seems only PWA is missing from this alphabet soup)

1 Like

This is a temporary decision. I don’t yet have enough experience to make a good decision.

1 Like