Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Fluent Conf 2018: Building web apps with Elm Tu...
Search
Jeremy Fairbank
June 12, 2018
Programming
2
830
Fluent Conf 2018: Building web apps with Elm Tutorial
Jeremy Fairbank
June 12, 2018
Tweet
Share
More Decks by Jeremy Fairbank
See All by Jeremy Fairbank
Connect.Tech 2020: Advanced Cypress Testing
jfairbank
1
190
CodeMash 2020: Solving the Boolean Identity Crisis
jfairbank
1
140
CodeMash 2020: Practical Functional Programming
jfairbank
1
310
Connect.Tech 2019: Practical Functional Programming
jfairbank
0
340
Connect.Tech 2019: Solving the Boolean Identity Crisis
jfairbank
0
170
Lambda Squared 2019: Solving the Boolean Identity Crisis
jfairbank
0
120
All Things Open 2018: Practical Functional Programming
jfairbank
2
260
Connect.Tech 2018: Effective React Testing
jfairbank
1
150
Codestock 2018: Building a Resilient, API-driven Front-End with Elm
jfairbank
0
250
Other Decks in Programming
See All in Programming
RubyKaigi Dev Meeting 2025
tenderlove
1
190
Making TCPSocket.new "Happy"!
coe401_
1
1.6k
設計の本質:コード、システム、そして組織へ / The Essence of Design: To Code, Systems, and Organizations
nrslib
4
630
Dissecting and Reconstructing Ruby Syntactic Structures
ydah
1
750
リストビュー画面UX改善の振り返り
splcywolf
0
150
PHP で学ぶ OAuth 入門
azuki
1
210
Rollupのビルド時間高速化によるプレビュー表示速度改善とバンドラとASTを駆使したプロダクト開発の難しさ
plaidtech
PRO
1
180
メモリウォールを超えて:キャッシュメモリ技術の進歩
kawayu
0
1.9k
Sharing features among Android applications: experience feedback
jbvincey
0
110
Thank you <💅>, What's the Next?
ahoxa
1
490
Empowering Developers with HTML-Aware ERB Tooling @ RubyKaigi 2025, Matsuyama, Ehime
marcoroth
2
740
エンジニアが挑む、限界までの越境
nealle
1
240
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
41
2.2k
Why Our Code Smells
bkeepers
PRO
336
57k
Git: the NoSQL Database
bkeepers
PRO
430
65k
A better future with KSS
kneath
239
17k
How to train your dragon (web standard)
notwaldorf
90
6k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
12k
Designing for Performance
lara
608
69k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.5k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Transcript
Jeremy Fairbank @elpapapollo / jfairbank Building web apps with Elm
Visit README for demo and exercise URLs: bit.ly/fluent-elm-18
@testdouble helps improves how the world build software. testdouble.com/agency
bit.ly/programming-elm
Functional and statically typed programming language for frontend development elm
Web and UI Focused
Compiles to JavaScript
No runtime exceptions in practice.
The 2nd argument to function `add` is causing a mismatch.
7| add 2 "3" ^^^ Function `add` is expecting the 2nd argument to be: Int But it is: String Compile time static type checks
Functional
Pure Data in Data out
Pure No side effects
Pure Predictable and Testable!
Immutable Data • Safety and consistency • Explicit flow of
data • No subtle mutation bugs
No undefined is not a function
Fast
One framework. No fatigue. Update View Model Messages
✓ Easier to write code ✓ Easier to write tests
✓ Easier to refactor
Content • Functions and expressions • Static applications • Dynamic
applications with the Elm Architecture • Working with Lists • Static Types and Type Aliases • Input Events and Union Types
Format • Demos via ellie-app.com • Exercises via ellie-app.com •
Q&A
Coding Time! README for demo and exercise URLs: bit.ly/fluent-elm-18
Update View Model Messages The Elm Architecture
Application State Model
Model Virtual DOM View UI as a Function
elm Virtual DOM Todo List Learn Elm Build awesome Elm
apps Learn functional programming <html /> Model: Todo List
× Todo List Learn Elm Build awesome Elm apps Learn
functional programming User deletes first todo item <html /> Model: New Todo List
Todo List Learn Elm Build awesome Elm apps Learn functional
programming View Model: New Todo List Elm notices missing todo item in virtual DOM list, so it just removes the corresponding <li> instead of fully rendering. elm Virtual DOM ×<html />
Messages Standardized application events
elm app model
elm app model Events Text Input Mouse Click Associate message
with event
elm app model Events Text Input Mouse Click When event
triggers (i.e. user clicks), deliver message
Update Model New Model Respond to messages and create new
state
model Update View
model Update View
model Update View VDOM
model Update View VDOM
model Update View Select red color
model Update View Select red color
model Update View Select red color
model Update View
model Update View
model Update View
model Update View VDOM
model Update View VDOM
Coding Time!
Resources • bit.ly/programming-elm • elm-lang.org • elm-lang.org/examples • guide.elm-lang.org •
www.elm-tutorial.org • builtwithelm.co • Slack • elmlang.herokuapp.com
Thanks! Jeremy Fairbank @elpapapollo / jfairbank Slides: bit.ly/fluent-elm-slides-18 Repo: bit.ly/fluent-elm-18