Live data from Hacker News

Ask HN: Anyone Using Elm in Production?

news.ycombinator.com

41–50 of 74 posts

Re: Ask HN: Anyone Using Elm in Production?

#41
post #38
post #28

Earlier quoted context omitted.

Just out of curiosity, how often do you use time travel debugging? I have redux dev tools and can use it on any of my apps, but I've never felt that it was more useful than the step debugger. The first time I set it up I thought "huh, cool" and then never used it again. There's also the issue of side effects like ajax requests that interact with the outside world.

I had the same problem with time-traveling in react/redux. Everything has to be in the store for it to work, and since it's hard to make reusable components using the store, some things often end up outside. Then time-traveling becomes buggy. But since it's impossible with side-effects in elm, you can always trust it there. I use it pretty often to jump between states. The UI is not as good as redux-devtools and as f…

What about ajax requests though? What if you are debugging a component that sends a DELETE request?

Re: Ask HN: Anyone Using Elm in Production?

#42
post #31
post #26

I’ve used it on a deployed and used project app. On a substantial commercial internal project. And have 2 other apps in the works. I’ve used ports and custom elements to integrate JS code. I’m convinced Elm is an excellent way (and my preferred way) to build frontend apps. The learning curve is a bit tricky. I think the path to toy apps is straightforward and fun. The path to “real world” apps requires a bit more eff…

I've been picking it up lately and I'm curious if you have any links to non-trivial application sources. I'm curious how the architecture scales and how it handles cross cutting concerns.

You'll probably want to watch Richard Feldman's [Scaling Elm Apps](https://www.youtube.com/watch?v=DoA4Txr4GUs). I built [Component Result](https://package.elm-lang.org/packages/z5h/component-result/l...) to help with a pattern that occurs when scaling up apps. I'm not clear what you mean by or expect to be problematic with by cross-cutting concerns. Feel free to ping me, z5h, on the Elm slack.

Re: Ask HN: Anyone Using Elm in Production?

#43
post #29
post #13

Earlier quoted context omitted.

I think “deeply nesting components” means dropping a stateful component (view+behaviour+state) anywhere in your app without anything else changing. That’s not possible in Elm since the only place to store state is the central state storage. Which makes perfect sense, but often freaks people out, since it’s an uncommon design constraint.

With only one store, how do you keep your state reasonably organized when you get up to hundreds of pieces of data to manage? And what do you do about generic reusuable components that need state? Say a typeahead search that needs to track the input string and the list of results from the server?

If you really really really can’t live without a statefull component, you can always build a custom element (which can be a wrapper around an elm app). But reusable views with fairly complex state are used; they require a little bit of wiring up, but it means you know exactly where to look when there’s a big/problem.

Re: Ask HN: Anyone Using Elm in Production?

#45
post #41
post #38

Earlier quoted context omitted.

I had the same problem with time-traveling in react/redux. Everything has to be in the store for it to work, and since it's hard to make reusable components using the store, some things often end up outside. Then time-traveling becomes buggy. But since it's impossible with side-effects in elm, you can always trust it there. I use it pretty often to jump between states. The UI is not as good as redux-devtools and as f…

What about ajax requests though? What if you are debugging a component that sends a DELETE request?

It doesn't end up spamming requests the same way as in react, as there is no "componentDidMount" that can trigger side-effects. In elm it's just different states being rendered.

Re: Ask HN: Anyone Using Elm in Production?

#46
Using Elm for an admin interface (not web-facing).

Elm is incredibly reliable (that's why we experimented with it in the first place) as well as very productive once you get used to the Functional paradigm.

Refactoring especially is a breathe (as long as it compiles, it usually works) and we didn't need to test the frontend for it to stay sane.

We even started covering more and more of our admin's old views with it and are on our way towards an SPA.

Re: Ask HN: Anyone Using Elm in Production?

#47
Yes, replaced few rich and reasonably complex UI components in admin interface that were previously developed in Adobe Flash (developed in the times when html wasn't as expressive for more visual/interactive UIs). The end users did not notice any difference.

The language is pure joy to work with. No issues with "deeply nested components", just use a function to render a "component", add data needed for the rendering as a function parameter, handle the events emitted from the "component" in the update-function.

Re: Ask HN: Anyone Using Elm in Production?

#48

We've been using Elm in production for about 4 years (currently about 300,000 lines of code) and the experience has been wonderful! We rave about it. Also, we're hiring! No Elm experience required; over the years we've had many new hires pick it up on the job. :) https://www.noredink.com/jobs

Also, the creator of Elm works at noredink, so if you really want to learn it, there's probably not a better place. ;)

Re: Ask HN: Anyone Using Elm in Production?

#50
We've been using Elm in production for the last year to power an app used by 100,000 public school students in the US, and it's been fantastic.

The Elm language and framework really do live up to their promise: it's a delightful development experience. Despite rewriting our entire 4-year-old UI we've had remarkably few bugs despite multiple large refactors. The whole team was new to Elm when we started, and now everyone's an advocate.

Re: components, I'd echo what others have said. Because the view code can't have side effects, components become much simpler and a whole category of the problems we've had in one of our Javascript apps just don't happen. You sometimes will want to separate out logic for subsystems in your update function, but that's pretty well supported.

Also, if you're interested in working in Elm and making a measurable difference in student learning, we're hiring!

https://www.esparklearning.com/company/careers

Post reply on HN