Introduction to Elm, v2

Review & Other Resources

Richard Feldman

Richard Feldman

Vendr, Inc.
Introduction to Elm, v2

Check out a free preview of the full Introduction to Elm, v2 course

The "Review & Other Resources" Lesson is part of the full, Introduction to Elm, v2 course featured in this preview video. Here's what you'd learn in this lesson:

Richard reviews the topics the workshop has covered and shares additional resources.

Preview
Close

Transcript from the "Review & Other Resources" Lesson

[00:00:00]
>> Richard Feldman: So to summarize, Elm, as we've seen, is a language that complies the JavaScript. As we've seen, it's got a lot of differences to JavaScript. It's not sort of Java Script with some tweaks, it really is its own separate programming language that just uses JavaScript as a compilation target so that browsers understand it.

[00:00:15]
We talked about how companies of all different sizes are using Elm for all sorts of different purposes. Yours could potentially be the next one. We've seen some of the technical benefits that are leading companies to choose things like that. Something I'm always curious about, did anyone encounter any runtime exceptions while doing this workshop?

[00:00:34]
>> Richard Feldman: Not surprised. [LAUGH] So hopefully, you've gotten some sort of a sense of how Elm is able to do this. It's because the design of the compiler, and the design of the libraries in conjunction with the compiler, really do make it extraordinarily difficult to accidentally crash your Elm code in production.

[00:00:50]
This is not a fluke, this is the norm. We've also seen how to sort of embed Elm in an existing piece of HTML with Elm.Main.init, sometimes passing it a node like this, which is what we did at the beginning of the workshop, before we switched to the single page app that was taking over the entire page.

[00:01:09]
This is really the key to incremental adoption. This sort of embedding it into one piece of one page Along with the JavaScript interop techniques that we learned in the last section, are the most common story for how people get started using Elm at work. It's almost never a green field, like we're gonna build this new thing in Elm from scratch.

[00:01:26]
It's almost always we've got an existing application, we wanna try Elm out. Let's just get a little bit of Elm going on one page, get it into production, see how we like it. Something very small and low risk. Low risk is the key to incremental adoption, and that's been the most successful success story we hear over and over again.

[00:01:44]
>> Richard Feldman: We talked about the Elm architecture. This is sort of the final form of it with model view and update, like we started out with, and then we added commands later. And then finally, we added subscriptions to sort of fit the entire puzzle together. Update is sort of the brains of the operation, it receives messages from a variety of different sources.

[00:02:01]
And once it does receive those messages, it can potentially update the model. Which, in turn, transitions view to render some new HTML. And potentially, we trigger some subscriptions that we might wanna turn on and off. The runtime orchestrates the whole thing, ties everything together and makes it so that every single Elm function that we write in the entire language can be completely pure while still being able to do all of the useful things that we need to be able to do to make a working web application.

[00:02:28]
If you wanna see the final version of this, like the actual for real, for real version, without any induced bugs for exercise purposes, it's at github.com/rtfeldman/elm-spa-example. Also in that repository are links to the real world examples for all the other different architectures. So they've got React, Angular, View, all sorts of different things that you can compare to see what would this application look like in Elm?

[00:02:54]
What's the analog in React and Angular and View, etc.? So you can pick a technology that you are more familiar with and just kind of bounce back and forth and see how things are done and how things are sort of different between the two. Also, big thanks to the Thinkster for putting that together because I think that's been an incredibly helpful tool for people to learn these technologies.

[00:03:16]
>> Richard Feldman: Shout out to the official Elm guide. This is really kind of the the source for what is the right way to do Elm applications. This is written by Evan, the creator of Elm. It's on the Elm website, and it goes through a lot of the same types of material that we just went through in it in a different format.

[00:03:33]
Also, Elm in Action is a book I'm writing for Manning Publications. It's mostly done, but not completely done, so you can get that early access right now through their MIF program. Also, definitely very strong shout out to Elm Slack. This is not like Slack in other communities, I'm told, because, especially the beginner's channel is just full of unbelievably friendly, helpful people who spend a lot of time just helping people out.

[00:04:00]
I hear over and over again that is the best resource is just hop on Slack, get in the beginners channel, whatever question you have, just ask it. Chances are someone's gonna answer it pretty quickly and help you get unstuck with anything that you run into along the way.

[00:04:13]
So highly, highly recommend Slack. It's the number one resource for getting Elm questions answered when you're getting started.
>> Richard Feldman: There's also an Elm discourse, discourse.elm-lang.org. This is more of a sort of long forum discussions and stuff like that. Not as helpful as Slack, based on my anecdotal evidence that I've heard from people, but still a useful source of knowledge and discussions.

[00:04:38]
There's an FAQ, which includes quite a bit of things. This is sort of a community curated thing of just common questions that people have, like somebody asked earlier about, hey, what's about Elm on the server? There's just a lot of stuff like that that people just sort of run into.

[00:04:50]
So when in doubt, that's a good place to go. The Elm Town Podcast has lots of cool, entertaining topics. They've got, I don't know, some 40-some-odd episodes over the past couple years, it's at elmtown.audio. And finally, there's some success stories that I think are worth reading to just sorta understand the different perspectives that people have under their experiences using Elm of work.

[00:05:12]
So obviously, I've had a lot of success. I've been Elm about four years at work, we have about a quarter million lines of Elm code at work. And we've been extremely happy with it, but it's not just us. I think if you're interested in using Elm work, I think it's helpful to read some of these stories from other people how Elm will work better.

[00:05:28]
Elm in Production 25,000 lines later. One year of Elm Production. And hopefully, at some point, your success story can go here on this slide. So that's it, that's the workshop. Thank you all so much for attending, and hopefully you learned something.
>> Group: [APPLAUSE]

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now