SlideShare a Scribd company logo
ELM
A possible future for web frontend
Agenda
What is Elm? Elm features
Elm
ecosystem
Elm
architecture
Why a
possible
future?
What is Elm?
Functional language
ML style language
Inspired by Haskell
Elm features
Statically
typed
∎ Primitive types
∎ Basic data structures
∎ Union types
Elm   a possible future for web frontend
Never
null
again
Elm   a possible future for web frontend
Immutability
Elm   a possible future for web frontend
Purely
functional
∎ Functions depend only on passed arguments
∎ No side effects
Effects
Effects in JS
∎ Synchronous
∎ Asynchronous via callback
∎ Asynchronous via promise
Elm   a possible future for web frontend
MOCKS
Elm   a possible future for web frontend
Elm   a possible future for web frontend
Effects as Data
Elm   a possible future for web frontend
Elm   a possible future for web frontend
Effects in Elm
∎ Synchronous via Messages
∎ Asynchronous via Tasks
Elm Tasks
∎ Module for async actions that might fail
∎ Tasks can be easily chained together
∎ Lazy: nothing will happen until something run them.
Interop with
JS: Ports
∎ Only way you have to receive or send informations from JS.
∎ It works like a pub-sub mechanism.
Elm architecture
Basic Pattern:
Counter App
∎ Model
∎ Messages
∎ Update
∎ View
here
Elm   a possible future for web frontend
Counter:
User Flow
User clicks on the “+”
button
Increment action
is fired
Update function
gets called
View gets
updated
Commands and
Subscriptions
∎ Commands: Tasks that Elm runs for you in the background
∎ Subscriptions: subscribe to data you care about
Subs Pattern:
Dice Roller App
Dice Roller:
User Flow
User clicks on
the “Roll” button
Roll action
is fired
Update
function
returns
command
Elm
executes
the task
“New
Number”
action is
fired
Update
function
gets
called
View gets
updated
here
here
here
here
Elm   a possible future for web frontend
Why a possible
future?
Elm   a possible future for web frontend
I don’t need Elm!
Functional programming Modern JS is inspired by FP
Components React
Effect as data Flux / Redux
Type checking Flow.js / Typescript
Immutability ImmutableJS / Ramda / Lodash
Modules Webpack / Babel
∎ Syntax
∎ Types
∎ Immutability
Learning curve
∎ Compiling
∎ Maybe and explicit error
handling
Use JS means...
Hard to start
new projects
Optional features
Relies on
programmers
Elm   a possible future for web frontend
Everything that is syntactically
legal, that the compiler will
accept, will eventually wind up
in your code base.
John Carmack
Elm instead...
Guided
programmers
Code easy to
understand
Code easy to
test
Elm ecosystem
Elm reactor
Elm
packages
Will Elm be
the future?
Elm   a possible future for web frontend

More Related Content

Similar to Elm a possible future for web frontend (10)

PDF
A Peek in to Elm Architecture
Jayaram Sankaranarayanan
 
PDF
Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)
Matthias Noback
 
PDF
Hexagonal architecture - message-oriented software design (Symfony Live Berli...
Matthias Noback
 
PDF
Hexagonal architecture - message-oriented software design (PHP Benelux 2016)
Matthias Noback
 
PDF
Elm, the runtime error killer
Jordy Moos
 
PPTX
Elm - Could this be the Future of Web Dev?
David Hoerster
 
PDF
Hexagonal architecture message-oriented software design
Matthias Noback
 
PDF
Hexagonal Architecture - message-oriented software design (PHPCon Poland 2015)
Matthias Noback
 
PDF
Flow-based programming with Elixir
Anton Mishchuk
 
PPTX
Engineering Concurrent and Event-driven Web Apps: an Agent-Oriented Approach ...
Francesco Fabbri
 
A Peek in to Elm Architecture
Jayaram Sankaranarayanan
 
Hexagonal architecture - message-oriented software design (PHP Barcelona 2015)
Matthias Noback
 
Hexagonal architecture - message-oriented software design (Symfony Live Berli...
Matthias Noback
 
Hexagonal architecture - message-oriented software design (PHP Benelux 2016)
Matthias Noback
 
Elm, the runtime error killer
Jordy Moos
 
Elm - Could this be the Future of Web Dev?
David Hoerster
 
Hexagonal architecture message-oriented software design
Matthias Noback
 
Hexagonal Architecture - message-oriented software design (PHPCon Poland 2015)
Matthias Noback
 
Flow-based programming with Elixir
Anton Mishchuk
 
Engineering Concurrent and Event-driven Web Apps: an Agent-Oriented Approach ...
Francesco Fabbri
 

Recently uploaded (20)

PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
Python basic programing language for automation
DanialHabibi2
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
"Beyond English: Navigating the Challenges of Building a Ukrainian-language R...
Fwdays
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Ad

Elm a possible future for web frontend