Mazik's Dreams

modern front-end without JS

Adam "Mazik" Mazur

facebook.com/gerard.lycha | @mazikwyry

Dlaczego?

  • Nigdy nie należy przestawać marzyć

  • Nie lubię JS
  • Kocham Ruby
  • Brzydzi mnie JSX

React.js

PLUSY

+ Modularny

+ Skalowalny

+ Minimalistyczny

+ Uniwersalny

+ Obiektowy

MINUSY

- Napisany w JS

REDUX

A way to manage state of an app

  • One state per app
  • State is read-only
  • Actions produces NEW state

Let's make my dream come TRUE!

Proc, lambda

Examples of closures in ruby

DIFFERENCES

  • Lambdas check the number of arguments, while procs do not
  • Lambdas and procs treat the ‘return’ keyword differently

COMMONS

  • lambda is a object of a Proc class

Method Object

class Array
  def iterate!(code)
    self.each_with_index do |n, i|
      self[i] = code.call(n)
    end
  end
end

def square(n)
  n ** 2
end

array = [1, 2, 3, 4]

array.iterate!(method(:square))

Marzenia Mazika

By Adam Mazur

Marzenia Mazika

  • 157