6 ms·
I haven’t followed Elm very actively for quite awhile. My workplace has a kiosk product where I, along with two others, did the entire front-end UI in Elm. Mu
by Fr0styMatt88 7y ago
I haven’t followed Elm very actively for quite awhile. My workplace has a kiosk product where I, along with two others, did the entire front-end UI in Elm. Multiple screens, a full configuration interface and talking to a C# back-end. I think we’re on Elm 0.17 or Elm 0.18 still. At least at the time we shipped the first version, it was larger than any example app I’d seen and there weren’t a lot of non-toy applications or examples to compare against.
I certainly have overall positive feelings about it, with some frustrations (like any language really). I’ll say that the most stand-out thing about that code is that I can be off it for six months, come back to it and within an hour or so I’m back to comfortably knowing what’s going on.
I’d played around with functional languages before Elm; I’m a bit of a language nut. One thing that’s easy to forget is how intimidating the syntax can be to people who haven’t seen anything like it before.
I don’t know that I would do such a large project in Elm again though. Or at least, it’s not something I’d push for wider adoption within work; some has to do with factors like finding developers and fact it’s just really early days for the languages in the grand scheme of things. It needs more time to grow.
On the technical side, having subpages and doing the routing of messages can be really painful and I don’t really like the ‘huge flat data model’ approach. I abstracted the core routing boilerplate away by using a JavaScript templating library to make a boilerplate generator. You specify the screens you want and your main.elm gets generated from a template, with the appropriate message routing and handling for update and view calls and the structure of the top-level data model being generated for you into an Elm source file that actually gets compiled. it worked out for us, but I still feel like it’s working around a shortcoming of the language.
- gdotdesign 7y agoSince you are a language nut, I would like your opinion on the language I've been developing for more than a year now - Mint (https://www.mint-lang.com https://www.mint-lang.com) :) It's something between Elm and React (while actually using React as a platform) with a lot of built-in functionality like routing, styling, data storage and more.
- hopia 7y agoWow that's cool, components as first class citizens. The native control flow structures are also pretty innovative!
- eyelidlessness 7y agoThis looks really interesting, and I'd certainly consider trying it out for a personal project. If I may ask a question about syntax... Mint `render` returns look so very close to JSX syntax, but slightly different. It appears bare text variables are annotated `<{ varName }>` rather than `{ varName }`, and the `<Component::style ...>` syntax is unfamiliar. What is the motivation for providing a syntax so close to JSX but slightly different?
- gdotdesign 7y agoFor this particular syntax, the motivation here was to make it look like more of a tag than an interpolation.
- Vinnl 7y agoHeads-up: I submitted it as a separate post and it appears to be making the front page now. You might want to get in there: https://news.ycombinator.com/item?id=22246615 https://news.ycombinator.com/item?id=22246615
- hopia 7y agoBy huge flat data model do you refer to the sum type which basically holds your app's state? I've always wondered how that state management approach scales when the codebase grows, never seen a good example of a large scale web app architected with Elm.
- shanlalit 7y agoMost of the hand-on experiences I have read talk about some frustration and pain working with ELM, like talking to and from native javascript libs. Do we have a list of pain/frustrations in the X language/framework based on hand-on experience? People and language/framework experts could share their advice and suggest better ways.
- xena 7y agoCheck out https://elm-spa.dev https://elm-spa.dev, it helps fix a lot of this with boilerplate and code generation.