On Fri, Jan 27, 2017 at 4:51 PM, 'Rupert Smith' via Elm Discuss < [email protected]> wrote:
> On Friday, January 27, 2017 at 10:15:49 AM UTC, Rupert Smith wrote: >> >> I think what is missing is DB access. >> > > What would be even cooler is if you didn't need to worry about the > database. If there was a way of declaring a Model in Elm, and every time > you make an update to it, it automatically gets saved to the database, no > need invoke a port to save it. I've always though a language which has > persistence built in would be really cool. It could be done with Elm using > the same trick as the time travelling debugger - just spool all the updates > to disk and they form an 'event source' to recover the state from in the > event of a crash. Occasionally you would check-point the entire state model > to disk to make a fast recovery point. > > Well... this is what I'm looking into right now. Nobody wants to write boilerplate. :) The idea would be for the page to interact with a client-side database like entity that would take care of all the communication with the server. This is a complex topic. For example, I still have no idea how could one express relational data in Elm? e.g. Users have Messages and Messages have other Messages as replies and each of those Messages have Users. How would you model that in Elm? I started a topic back in October but I haven't followed it through and now it has almost completely vanished from my mind. I'll go again through that discussion and think some more on this. -- There is NO FATE, we are the creators. blog: http://damoc.ro/ -- 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.
