Hacker News new | ask | show | jobs
by randomacct44 3667 days ago
I'm looking at Elm for a product that I'm working on at the moment. The language is great and I've wanted an excuse to do actual work in an ML-like language for a long time.

The difficulty I'm having at the moment is just trying to find examples of non-toy application architectures. An application with multiple top-level screens, for example.

For a bit of context, the product I'm working on is a customer-facing kiosk. It'll be driven by a C# ASP.NET back-end. We have several different products using common back-end code but exposing different sets of features to the customer. We're moving from an old architecture that was your standard WinForms UI to something using HTML5 as the UI layer (definitely a big mindset change!).

Right now I'm trying to figure out what the front-end Elm code structure would look like. Is it going to be one huge monolithic Elm project that covers all our cases? Can it be broken up? Does the front-end have to know in advance what screens will be available? (the back-end uses the typical 'load features as plugin DLLs') etc. These are all questions I'm facing right now.

This is especially exacerbated by the recent change from 0.16 to 0.17. The changes themselves seem extremely positive (I jumped in at 0.17, so I'm only going off an impression here) but much of the example material that I've found which might be useful is still using stuff from 0.16 and I'm having trouble wrapping my head around it right now.

So from a commercial dev perspective, Elm, like anything else so new, is massively risky. I'm pushing on for the moment (would love any pointers if anyone has them!). I'm aware of the huge element of "not knowing what I don't know" that I've taken on right now. I'm hoping the payoff will be worth it :)

2 comments

I'm also looking for more structured examples but so far haven't found much. These are some apps that go a little beyond the "hello world" kind. Some of them are being updated to elm 0.17.

https://github.com/plentiful/shop

https://github.com/srid/chronicle

https://github.com/CultivateHQ/seat_saver

https://github.com/NoRedInk/elm-blogger

https://github.com/massung/elm-hn

https://github.com/sporto/elm-tutorial-app

http://package.elm-lang.org's source code is online and implemented in Elm. Not a large application, but it demonstrates a way to break up components like the header, sidebar, and a main content area across files. It's maintained by Elm's creator and stays up to date with Elm upgrades.

https://github.com/elm-lang/package.elm-lang.org/tree/master...