> > Haha yeah I get your point, but when you talk about the large redink code > base (no doubt it's huge), I'm curious of the granularity of your > production Elm apps. Is your code base generally organized as one/a few > large single page applications (routing handled client side - data via api) > or is your code organized into many smaller applications, each served on a > single server rendered html page (routing handled server side - maybe > initial data is provided directly through Elm.fullscreen rather than > hitting an api). >
The latter, although it's important to note that it's the same granularity either way. We started building our Elm code base on top of a large legacy non-SPA Rails app, so the way each individual page works is that Rails renders some JSON in a <script> which Elm then consumes and uses to build the initial Model. This is exactly the same organization as what a SPA does for each logical "page" - when the location changes and you want to render a new "page," you pass the "page" some data (not JSON, since there's no need to serialize from Elm to Elm like there is from Rails to Elm), that data becomes the page's initial Model, and you proceed from there. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
