Learning FP the hard way: Experiences on the Elm language
by Ossi Hanhinen, @ohanhi
with the support of Futurice
Licensed under CC BY 4.0.
|// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel|
|// MIT license|
|var lastTime = 0;|
|var vendors = ['ms', 'moz', 'webkit', 'o'];|
How do you send information between clients and servers? What format should that information be in? What happens when the server changes the format, but the client has not been updated yet? What happens when the server changes the format, but the database cannot be updated?
These are difficult questions. It is not just about picking a format, but rather picking a format that can evolve as your application evolves.
By now there are many approaches to communicating between client and server. These approaches tend to be known within specific companies and language communities, but the techniques do not cross borders. I will outline JSON, ProtoBuf, and GraphQL here so we can learn from them all.
The code and instructions in this gist are from http://peterdowns.com/posts/open-iterm-finder-service.html. I've had to do this a few times and wanted to distill it the basics.
Actions > Utilities > Run Applescript
open_in_iterm.appinto the window.
Functional programming principles and with it immutable data are changing the way we write frontend applications. If the recent de-facto frontend stack of React and Redux feels like it goes perfectly together with immutable data, that's because it's specifically designed for that.
Immutable.js provides a beautiful, Clojure-inspired API for dealing with abstract Collections and Sequences, and several concrete data structur