For frontend devs, I am going to present a programming pattern that makes creating interactive browser based user interfaces much simpler than any existing JavaScript framework. I will show how Elm programming language can force us to follow the right path, which is great for working in teams.
For backend devs, I am going to show why it is not wise to use the same patterns (and languages) for backends and present how Elixir provides different set of abstractions which helps with scaling. I also briefly touch on Phoenix Framework principles which have couple similarities to the Elm way.
2. What is this talk about?
● Programming web applications
● Patterns applicable not only in Elm and Elixir
– single source of truth
– one directional flows
● How programming languages shape programs?
● Why is it a good idea to use more than one
programming language in your app?
3. Why new programming languages?
● functional vs imperative
● languages are defined by what is easy to do
● but sometimes even more by what is HARD
++++++++[>++++[>++>+++>++
+>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..++
+.>>.<-.<.+++.------.--------.>>+.>++.
4. Erlang – made for fault tolerance
● Easy concurrency
● Easy distribution
● Easy debugging
● Easy messaging
● Impossible sharing memory
● Impossible reassigning variables
● Relatively hard string manipulation
5. Elixir – made for web
● Metaprogramming
● Strings done well
● Inherits all good and bad sides of Erlang
6. Elm – made for browser
● Static typing
● Almost no runtime exceptions
● Very easy to follow programming model
17. Functional languge
def function(arg1, arg2) do
value = some_computations(arg1)
another_value = some_computations(arg2)
value + another_value
end
PMC = 4
18. OO Language
def method(arg1, arg2) do
value = some_computation(arg1 + property1)
property2 = some_computation(arg2)
value + property2
end
47. - Single data structure (source of truth)
- flow in one direction
48.
49. Connecting Phoenix and Elm
● Phoenix Channels
● Phoenix asset pipeline
● Elm ports
● Elm signals
50. Resources
Elm lang homepage: http://elm-lang.org/
Elm architecture https://github.com/evancz/elm-architecture-tutorial
Different FRP model https://www.youtube.com/watch?v=Agu6jipKfYw
Time traveling debugger http://debug.elm-lang.org/
Elixir lang homepage: http://elixir-lang.org/
Phoenix framework: http://www.phoenixframework.org/
Programming Phoenix:
https://pragprog.com/book/phoenix/programming-phoenix
Elixir + Elm tutorial http://www.cultivatehq.com/posts/phoenix-elm-1/
Elm + Elixir keynote https://www.youtube.com/watch?v=XJ9ckqCMiKk
My blog: http://tkowal.wordpress.com/
51. Things to remember #1
Different programming languages solve different
problems.
52. Things to remember #2
For interactive web applications check out both
Elixir and Elm
53. Things to remember #3
If you like this talk, follow me on Twitter
@snajper47