I've just started learning Elm, and am starting to think about how to 
structure my first application.

The app in question is a photo album viewer (in the spirit of 
http://bins.sautret.org/).  The idea is to start with a directory tree of 
images (on a local FS, served by a plain HTTP server.)  Run a program over 
that FS tree to produce a JSON description of the album tree.  Then feed 
that JSON into an Elm program to browse through the albums.

My question is: how best to implement the dir-tree -> JSON program?  
Ideally I'd like to declare the data types representing the album tree once 
and share them between the dir-tree -> JSON program and the Elm browsing 
app.  Options I've considered:

a) Elm compiled to js, run in node, using ports to communicate with node's 
file API
b) Haskell program, using a mechanically-transformed Elm types file to 
share the types (think: sed s/type alias Image/data Image = Image/)

I don't have much Haskell or Elm experience, so there's a lot of 
hand-waving in both approaches for me at this point.  Any thoughts on the 
above options, or suggestions that I haven't considered, are appreciated!  
Thanks!

-- 
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.

Reply via email to