Nice article! Here are my 2 cents, having used both Elm and Svelte in small/mid-sized pet projects.
Elm:
Elm has a steep learning curve, but there are good books and once you learn it you start really enjoying coding in it
The Elm Architecture is awesome! Simple to understand and reason about.
FP in general is also awesome, very easy to understand and debug.
In elm, you generally write more code (I would say 3x) but most of it is types and formatting
A well built Elm app scales really well, very easy to add features and refactor.
If you do not have good relationship (or just hate it) with JS and it's ecosystem you'll be very happy with Elm.
As described in this post you write a lot of boilerplace code. Especially form handling and JSON encoding/decoding. If you are tight on schedule, this might be a problem.
Great tooling, editor support.
JS interop is kinda pain.
Weak package ecosystem, but most important ones are already there. I would love to see more UI libraries though.
Would love a complete Elm based Backend + Frontend solution, to eliminate middle steps like JSON encoding/decoding and model duplication.
Great for projects where the importance of strict UI is high. If my business's success was in hands of frontend, I would choose Elm.
Svelte:
Just Javascript, plain old HTML and CSS. Web as it was intented to be.
Much less boilerplate code, even comparing with other JS frameworks.
Really fun to develop with and easy to learn for non-programmers and new frontend engineers
You have to use Js and accept all its' quirks.
Great for most of frontend projects that support already working backend
Has all the npm package ecosystem but still lacks in comparison with React/Vue. I'm talking about Material UI, grids, animations.
Stores is very easy to understand and use (in contrast to React/Angular)
If my business mostly relied on backend work but would also require to have a nice complementing frontend, I would use Svelte.
For prototypes and MVPs I would definitively use Svelte.
Thank you for your awesome comment. I basically agree with all that you said. Couple of small additions...
I think the official Elm documentation is also quite good with its own way of gradually introducing complex concepts.
About "I would love to see more UI libraries", I guess you are familiar with elm-ui but if you are not, have a look at it. If you mean something similar to Material Design, there are things like aforemny/material-components-web-elm but I personally prefe the elm-ui concept
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice article! Here are my 2 cents, having used both Elm and Svelte in small/mid-sized pet projects.
Elm:
Svelte:
Hi Metin,
Thank you for your awesome comment. I basically agree with all that you said. Couple of small additions...
I think the official Elm documentation is also quite good with its own way of gradually introducing complex concepts.
About "I would love to see more UI libraries", I guess you are familiar with elm-ui but if you are not, have a look at it. If you mean something similar to Material Design, there are things like aforemny/material-components-web-elm but I personally prefe the elm-ui concept