Giter Club home page Giter Club logo

elmapps's Introduction

Guide to learning Elm

Thank the creator of Elm and BDFL, Evan Czaplicki.

I would highly recommend reading the guide and writing elm code before watching any videos.

  • Read the Guide. This is a gitbook by the creator of Elm
  • Try Elm out in the browser. (Hint - try the stuff from the book)
  • Watch a video series to remind yourself of the concepts.
  • Complete the Elm for beginners course over the weekend
  • Complete the exercises for that course
  • Oh! And setup your computer to to Eฮปmy stuff:

Dev Setup For Elm

  • Install NodeJS LTS
  • Install elm with npm install -g elm
  • Configure atom.
    • elm-oracle, elm-format, linter-elm-make to lint on save.

Notes

ELM Apps use this terminology for talking about it's design pattern.

  • Model
  • Update
  • View
  • Subscribers
  • Commands

Nice overview video of the architecture

Everything is an expression in elm, that's why theres no return statement

All data is immutable in Elm

Elm is strongly typed - there is not implicit type conversion. If a function takes a String you can't give it a Number, you must explicitly convert it to a String (2 -> "2")

Elm has a friendly compiler :) Very verbose and likes to suggest things.

Pure functions

  • No Side effects
  • Reusable
  • Composable
  • Testable
  • Cacheable
  • ...

Imports

Import everything from Html into our modules namespace

import Html exposing (..)

Import a few things from Html into our modules namespace

import Html exposing (text, div)

Types

Parameterized type

view : Model -> Html Msg

Union type

type Msg
  = Increment
  | Decrement

Type aliasing (call an Int by Model)

type alias Model =
  Int

random questions What is the technical difference between a statement and an expression?

Example : if/else in Elm, vs. if in other langs.

If elm is meant for front end web applications why does the html package come seperate?

Baby app ideas:

  • Show random ascii art face
  • Searchable ascii art faces (face with searchable keywords, click to show matching faces)

elmapps's People

Watchers

James Cloos avatar Nate avatar

elmapps's Issues

Learn Elm

in Elm...

  • The basics
  • model, view, update
  • HTML
  • Subscriptions and Commands
  • CSS
  • HTTP / Authentication
  • DOM Storage / indexedDB
  • Forms?

try & share

And continue to get curried away with elm:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.