DrupalCon New Orleans 2016: Elm - Frontend with Guarantees

You had enough of Angular1, and as good as React may be, you are still trying to figure out what router library to use and how to setup your project.

Elm is a functional programming (FP) language for your browser. It has no runtime exceptions, libraries with guarantees, Virtual-dom rendering, Clean syntax and more.

The reason Gizra decided to go with Elm is we know it will save us money (Oh, and it's also really fun to work with).

PROS & CONS

Like any other tool, it has pros and cons:

It's not mainstream.

The community is small, which means there are not tons of libraries out there, so you'll have to scratch your own itch more often than not.

There are not many blog posts/tutorials out there, especially if compared to popular frameworks such as React.

There is a steep learning curve with a new unknown syntax that is not JS.

It's different from other things we know.

And the pros, which are totally subjective:

It's not JS. Obviously this statement is controversial, but it's no secret that JS can be very confusing.

This steep learning curve has an interesting side effect: all the developers in the issue queue/mailing list, even the newbies, are seasoned developers. It's amazing to see how rapidly newcomers learn the new stuff and contribute back.

Once you pick up the concepts and follow the Elm architecture, the pieces start falling really neatly into their natural place. Each component in your app has the exact same structure as the other components and the root component itself.

There is a compiler that stops you from screwing things up - something we humans tend to constantly do.

It's different from other things we know. I think it's actually good because we have had enough of "the old way" (read as "Angular 1"). Even React & Redux, with their immense popularity and community, felt like a step in the right direction, but not quite the radical new approach to the problem we were looking for.

What You Will Learn

The advantages of functional programming

What are "Effects", and why you want to push them out of your App's logic

How your Elm SPA (Single Page Application) can work with Headless Drupal (hint: easily)

How the compiler forces us to be better developers

Drupal is a registered trademark of Dries Buytaert.