Elm
Functional Programming for Frontend
Jawahar
Thoughtworks
Agenda
Why Elm?
How does Elm work?
What distinguish Elm from other languages?
Why Elm?
Why not Javascript ?
● Not pure functional.
● Dynamically typed. Leads to runtime exceptions.
● Unpredictable.
Package Managers
State Management
Redux
Virtual DOM/UI Rendering
ReactJS Vue.js
Static Type system
Flow JSTypescript
Pure
functional
Strongly
typed
State
management
Virtual
DOM
How does Elm work?
INIT
VIEW
UPDATE
STATEDOM
STATE
MSG
STATE
on click
Redux evolves the ideas of flux, but
avoids its complexity by taking cues
from Elm.
-Dan Abramov, Author of Redux
.elm
.elm
bundle.js
runtime.js
.html
.css
Elm Project
Elm
Compiler
Build artifacts
Code Walkthrough
Human readable
error messages
Tagged Unions
(Composite Data Type)
Book Shop
New item Collectible
Store Item is a
Book
Or Art
Or Collectible
Zero runtime
exceptions
Possibility for null
exception
findByIdInteger Person
findByIdInteger Maybe Person
Enforced error handling
Auto semantic versioning
Summary
Great language features
Steep learning curve
Incremental Adoption
Javascript Interop

Elm - functional programming for frontend