SlideShare a Scribd company logo
WHY ELM?WHY ELM?
SCOTT SMITHSCOTT SMITH
SCOTTNELSONSMITH@GMAIL.COMSCOTTNELSONSMITH@GMAIL.COM
WHY ELM EXIST??WHY ELM EXIST??
Purpose: "writing great code should be easy … now it is"
How: "the best of functional programming in your browser"
Example: "Hello World"
WHY ELM LANGUAGE?WHY ELM LANGUAGE?
Elm Syntax
Core Language
WHY ELM LIBRARIES?WHY ELM LIBRARIES?
Rendering
Effects
elm-http
start-app
elm-effecs
elm-html
elm-svg
elm-markdown
elm-webgl
Core
WHY ELM RELIABILITY?WHY ELM RELIABILITY?
Contracts
Enumerations
State Machines
Tagged Unions
Banishing NULL
Recursive Data Structures
Precisely model the problem!
WHY ELM EXAMPLES?WHY ELM EXAMPLES?
Graphics
Games
WHY ELM GRAPHICS?WHY ELM GRAPHICS?
Build in concepual layers
shape outline the shape
form "fill in" shape using texture
collage render List of form in rectangular area
Html convert collage to HTML elements
GRAPHICS EXAMPLEGRAPHICS EXAMPLE
import Html exposing (text)
import Graphics.Collage exposing (..)
import Graphics.Element exposing (..)
import Color exposing (lightBrown)
main =
Html.fromElement (collage 200 200 [
filled lightBrown (ngon 4 50)
])
GRAPHICS EXMAPLE USING ELIXIR PIPEGRAPHICS EXMAPLE USING ELIXIR PIPE
tho it's called a forward function in Elm
import Html exposing (text)
import Graphics.Collage exposing (..)
import Graphics.Element exposing (..)
import Color exposing (lightBrown)
main =
ngon 4 50
|> filled lightBrown
|> List.repeat 1
|> collage 200 200
|> Html.fromElement
WHY ELM GAMES?WHY ELM GAMES?
( )GitHub
Mario
Pong
Froggy
WHY ELM ARCHITETURE?WHY ELM ARCHITETURE?
-- MODEL
type alias Model = { ... }
-- UPDATE
type Action = Reset | ...
update : Action -> Model -> Model
update action model =
case action of
Reset -> ...
...
-- VIEW
view : Model -> Html
view =
...
WHY ELM SIGNALS?WHY ELM SIGNALS?
type alias Model = Int
type Action = Increment | Decrement
update : Action -> Model -> Model
update action model =
case action of
Increment -> model + 1
Decrement -> model - 1
view : Signal.Address Action -> Model -> Html
view address model =
div []
[ button [ onClick address Decrement ] [ text "-" ]
, div [ countStyle ] [ text (toString model) ]
, button [ onClick address Increment ] [ text "+" ]
]
Running Code!
WHY ELM REACTIVE?WHY ELM REACTIVE?
WHY ELM FOR ME?WHY ELM FOR ME?
Javascript is general purpose – no "point of view"
Functional programming: creativity through constraints
Hoping it guides me on building a non-trivial 2D game
WHY LEARN ELM?WHY LEARN ELM?
Weekly Elm Hacking Session
Saturday mornings 10:00-noon (starting May 7)
Here
Emphasis on client functional programming
Game development
Sophisticated user experience
Integration w/ Elixir/Phoenix

More Related Content

PDF
Elm or how I learned to love front-end development
PPT
Plug-in Architectures
PPT
2 Day - WPF Training by Adil Mughal
PPT
Introduction to XAML and WPF
PPTX
WPF - An introduction
PPTX
Windows Presentation Foundation
PPT
Building Blocks For Your Modules Ui
PPT
Elm or how I learned to love front-end development
Plug-in Architectures
2 Day - WPF Training by Adil Mughal
Introduction to XAML and WPF
WPF - An introduction
Windows Presentation Foundation
Building Blocks For Your Modules Ui

What's hot (7)

PPT
Windows presentation foundation
PPTX
Windows Presentation Foundation & XAML
PDF
How to add watermark to image using php
PDF
Beyond JavaScript Frameworks: Writing Reliable Web Apps With Elm - Erik Wende...
PPTX
Vba part 1
PPT
John Murray :: Think Do Keep
PPTX
Vba Class Level 1
Windows presentation foundation
Windows Presentation Foundation & XAML
How to add watermark to image using php
Beyond JavaScript Frameworks: Writing Reliable Web Apps With Elm - Erik Wende...
Vba part 1
John Murray :: Think Do Keep
Vba Class Level 1
Ad

Similar to What About Elm? (20)

PDF
Rethink Frontend Development With Elm
PDF
Rethink Frontend Development With Elm
PDF
Elm, the runtime error killer
PDF
Phoenix with Elm
PDF
Erik Wendel - Beyond JavaScript Frameworks: Writing Reliable Web Apps With El...
PDF
Elm dev front-end
PDF
Writing Game Servers with Elixir
PDF
Oracle Enterprise Manager 12c: EMCLI Crash Course
PPT
01 concepts of_object-orientation (1)
PDF
Play with elm - Choucri fahed, Finstack - Lambadays
PPTX
Elm: Make Yourself A Happy Front-end Web Developer
PPTX
Make Yourself a Happy Front-end Web Developer with Elm.
PDF
Functional programming and Elm
PPS
EMF - The off beat path
PDF
Elm @ DublinJS
PDF
MVP Mix 2015 Leveraging MVVM on all Platforms
PDF
Elm 0.17 at Dublin Elm Meetup May 2016
PPT
Programming in UML: Why and How
PDF
elm-d3 @ NYC D3.js Meetup (30 June, 2014)
Rethink Frontend Development With Elm
Rethink Frontend Development With Elm
Elm, the runtime error killer
Phoenix with Elm
Erik Wendel - Beyond JavaScript Frameworks: Writing Reliable Web Apps With El...
Elm dev front-end
Writing Game Servers with Elixir
Oracle Enterprise Manager 12c: EMCLI Crash Course
01 concepts of_object-orientation (1)
Play with elm - Choucri fahed, Finstack - Lambadays
Elm: Make Yourself A Happy Front-end Web Developer
Make Yourself a Happy Front-end Web Developer with Elm.
Functional programming and Elm
EMF - The off beat path
Elm @ DublinJS
MVP Mix 2015 Leveraging MVVM on all Platforms
Elm 0.17 at Dublin Elm Meetup May 2016
Programming in UML: Why and How
elm-d3 @ NYC D3.js Meetup (30 June, 2014)
Ad

Recently uploaded (20)

PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Nekopoi APK 2025 free lastest update
PPTX
Introduction to Artificial Intelligence
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
medical staffing services at VALiNTRY
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
top salesforce developer skills in 2025.pdf
PPTX
Reimagine Home Health with the Power of Agentic AI​
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
Softaken Excel to vCard Converter Software.pdf
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Wondershare Filmora 15 Crack With Activation Key [2025
Upgrade and Innovation Strategies for SAP ERP Customers
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Nekopoi APK 2025 free lastest update
Introduction to Artificial Intelligence
Navsoft: AI-Powered Business Solutions & Custom Software Development
How to Migrate SBCGlobal Email to Yahoo Easily
medical staffing services at VALiNTRY
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Design an Analysis of Algorithms I-SECS-1021-03
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
top salesforce developer skills in 2025.pdf
Reimagine Home Health with the Power of Agentic AI​
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
2025 Textile ERP Trends: SAP, Odoo & Oracle

What About Elm?

  • 1. WHY ELM?WHY ELM? SCOTT SMITHSCOTT SMITH SCOTTNELSONSMITH@GMAIL.COMSCOTTNELSONSMITH@GMAIL.COM
  • 2. WHY ELM EXIST??WHY ELM EXIST?? Purpose: "writing great code should be easy … now it is" How: "the best of functional programming in your browser" Example: "Hello World"
  • 3. WHY ELM LANGUAGE?WHY ELM LANGUAGE? Elm Syntax Core Language
  • 4. WHY ELM LIBRARIES?WHY ELM LIBRARIES? Rendering Effects elm-http start-app elm-effecs elm-html elm-svg elm-markdown elm-webgl Core
  • 5. WHY ELM RELIABILITY?WHY ELM RELIABILITY? Contracts Enumerations State Machines Tagged Unions Banishing NULL Recursive Data Structures Precisely model the problem!
  • 6. WHY ELM EXAMPLES?WHY ELM EXAMPLES? Graphics Games
  • 7. WHY ELM GRAPHICS?WHY ELM GRAPHICS? Build in concepual layers shape outline the shape form "fill in" shape using texture collage render List of form in rectangular area Html convert collage to HTML elements
  • 8. GRAPHICS EXAMPLEGRAPHICS EXAMPLE import Html exposing (text) import Graphics.Collage exposing (..) import Graphics.Element exposing (..) import Color exposing (lightBrown) main = Html.fromElement (collage 200 200 [ filled lightBrown (ngon 4 50) ])
  • 9. GRAPHICS EXMAPLE USING ELIXIR PIPEGRAPHICS EXMAPLE USING ELIXIR PIPE tho it's called a forward function in Elm import Html exposing (text) import Graphics.Collage exposing (..) import Graphics.Element exposing (..) import Color exposing (lightBrown) main = ngon 4 50 |> filled lightBrown |> List.repeat 1 |> collage 200 200 |> Html.fromElement
  • 10. WHY ELM GAMES?WHY ELM GAMES? ( )GitHub Mario Pong Froggy
  • 11. WHY ELM ARCHITETURE?WHY ELM ARCHITETURE? -- MODEL type alias Model = { ... } -- UPDATE type Action = Reset | ... update : Action -> Model -> Model update action model = case action of Reset -> ... ... -- VIEW view : Model -> Html view = ...
  • 12. WHY ELM SIGNALS?WHY ELM SIGNALS? type alias Model = Int type Action = Increment | Decrement update : Action -> Model -> Model update action model = case action of Increment -> model + 1 Decrement -> model - 1 view : Signal.Address Action -> Model -> Html view address model = div [] [ button [ onClick address Decrement ] [ text "-" ] , div [ countStyle ] [ text (toString model) ] , button [ onClick address Increment ] [ text "+" ] ] Running Code!
  • 13. WHY ELM REACTIVE?WHY ELM REACTIVE?
  • 14. WHY ELM FOR ME?WHY ELM FOR ME? Javascript is general purpose – no "point of view" Functional programming: creativity through constraints Hoping it guides me on building a non-trivial 2D game
  • 15. WHY LEARN ELM?WHY LEARN ELM? Weekly Elm Hacking Session Saturday mornings 10:00-noon (starting May 7) Here Emphasis on client functional programming Game development Sophisticated user experience Integration w/ Elixir/Phoenix