Upgrade to Pro — share decks privately, control downloads, hide ads and more …

On Simplicity

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on. →

On Simplicity

My personal reasoning about building the modern Web app frontend. Featuring functional reactive programming (FRP) and Elm.

Ossi Hanhinen

July 03, 2015

Transcript

22 slides
  1. COMPLEXITY • Things to know by heart - language, framework

    • Things to remember - project • Things to handle when _______
  2. CODE QUALITY • Code style • Modularity, separation of concerns

    • Tests • Code reviews • Quick hacks
  3. –Chris Wilson, http://bendyworks.com/ Mutability is a kind of Chekhov’s gun,

    it will go off by the third act simply because it is there.
  4. WHAT WE DO • Forbid language features - ESLint etc.

    • Agree on code style - JSCS etc. • Add functional and reactive abstractions - lodash, RxJS… • Switch out the language - Coffee, Clojure, JSX… • Add static types - AtScript, TypeScript, Flow… • Add immutable structures - Immutable.js, mori…
  5. FUNCTIONAL REACTIVE PROGRAMMING • Use immutable structures and global state

    • Describe what to do in pure functions • Subscribe to streams of input • Handle input safely
  6. –Jeremy Ashkenas, “Rise of the Transpilers” “Someone is going to

    unify these three different syntaxes and write a language that just addresses the web-platform directly and it’s going to be insanely popular”
  7. ELM

  8. • Immutability • Static Types & Records • Functional •

    Reactive - Signals • Minimal syntax • Compiles to ES5
  9. –Richard Feldman at MLOC.js I keep having this experience where

    I make a major breaking refactor, recompile, fix all the compiler errors...and when I bring up Dreamwriter, everything still works! No regressions! This experience makes refactoring SO much fun!
  10. RESOURCES Richard Feldman - Shipping a Production Web App in

    Elm Chris Wilson - Elm for the Frontend, Right Now elm-lang.org - /examples

More Decks by Ossi Hanhinen

Other Decks in Programming