phoenix for rubyists

64
Deccan RubyConf 2016 Mike North Levanto Financial @MichaelLNorth FOR ISTS

Upload: mike-north

Post on 11-Feb-2017

169 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Phoenix for Rubyists

Deccan RubyConf 2016

Mike North Levanto Financial

@MichaelLNorth

FOR ISTS

Page 2: Phoenix for Rubyists
Page 3: Phoenix for Rubyists

Yes No

????

Page 4: Phoenix for Rubyists

I <3 RUBY

Page 5: Phoenix for Rubyists

HERE’S SOMETHING IMPORTANT THAT COULDN’T HAVE BEEN

DONE WITHOUT RUBY & RAILS

Page 6: Phoenix for Rubyists

OPINIONS & PRODUCTIVITY

Page 7: Phoenix for Rubyists

1. THE STORY

Page 8: Phoenix for Rubyists

1. THE STORY

2. PHOENIX IS LIKE RAILS

Page 9: Phoenix for Rubyists

1. THE STORY

2. PHOENIX IS LIKE RAILS

3. PHOENIX IS NOT LIKE RAILS

Page 10: Phoenix for Rubyists

1. THE STORY

2. PHOENIX IS LIKE RAILS

3. PHOENIX IS NOT LIKE RAILS

4. HOWTO

Page 11: Phoenix for Rubyists

THE STORY

@chris_mccord dockyard.com Inventor of Phoenix

Chris Mccord

Page 12: Phoenix for Rubyists
Page 13: Phoenix for Rubyists

THE STORY

@chris_mccord dockyard.com Inventor of Phoenix

Chris Mccord

Page 14: Phoenix for Rubyists
Page 15: Phoenix for Rubyists

THE STORY

@josevalim plataformatec.com Rails Core Alum Inventor of Elixir

Jose Valim

Page 16: Phoenix for Rubyists

MOORE’S LAWComputing power doubles ~ every two years

Page 17: Phoenix for Rubyists
Page 18: Phoenix for Rubyists

MOORE’S LAWComputing power doubles ~ every two years

Page 19: Phoenix for Rubyists
Page 20: Phoenix for Rubyists

Erlang Ruby

Page 21: Phoenix for Rubyists
Page 22: Phoenix for Rubyists

!

!

!

!

"

Page 23: Phoenix for Rubyists

#

!

$☁

Page 24: Phoenix for Rubyists
Page 25: Phoenix for Rubyists
Page 26: Phoenix for Rubyists

[info] Sent 200 in 31µs

Page 27: Phoenix for Rubyists
Page 28: Phoenix for Rubyists
Page 29: Phoenix for Rubyists

THE STORY

@chris_mccord dockyard.com Inventor of Phoenix

Chris Mccord

Page 30: Phoenix for Rubyists
Page 31: Phoenix for Rubyists

1. THE STORY

2. PHOENIX IS LIKE RAILS

Page 32: Phoenix for Rubyists

RakeBundler

MIX

Page 33: Phoenix for Rubyists
Page 34: Phoenix for Rubyists
Page 35: Phoenix for Rubyists
Page 36: Phoenix for Rubyists
Page 37: Phoenix for Rubyists

Model Table Schema

Page 38: Phoenix for Rubyists
Page 39: Phoenix for Rubyists

ROUTER

Page 40: Phoenix for Rubyists

CONTROLLERS

Page 41: Phoenix for Rubyists

MIGRATIONS

Page 42: Phoenix for Rubyists

TESTS

Page 43: Phoenix for Rubyists

TEMPLATES

Page 44: Phoenix for Rubyists
Page 45: Phoenix for Rubyists

ERRORS

Page 46: Phoenix for Rubyists

1. THE STORY

2. PHOENIX IS LIKE RAILS

3. PHOENIX IS NOT LIKE RAILS

Page 47: Phoenix for Rubyists
Page 48: Phoenix for Rubyists
Page 49: Phoenix for Rubyists

PIPE FORWARD |>

•Shorthand for “send return along as first value of next function”

Page 50: Phoenix for Rubyists

IMMUTABILITY

Think of variables as “labels for values”

Page 51: Phoenix for Rubyists
Page 52: Phoenix for Rubyists

IMMUTABILITY

Think of variables as “labels for values”

Page 53: Phoenix for Rubyists

MODELS

Page 54: Phoenix for Rubyists

ActiveRecord & Making your life easy one N+1

query at a time

Page 55: Phoenix for Rubyists

MODELS

Page 56: Phoenix for Rubyists
Page 57: Phoenix for Rubyists

1. THE STORY

2. PHOENIX IS LIKE RAILS

3. PHOENIX IS NOT LIKE RAILS

4. HOWTO

Page 58: Phoenix for Rubyists

HOWTO

•One-shot rewrites are expensive and dangerous

•You suffer, your company suffers, your users suffer

•Incremental change makes everyone happier

Page 59: Phoenix for Rubyists
Page 60: Phoenix for Rubyists
Page 61: Phoenix for Rubyists

REVERSE PROXY

Rails Phoenix

Page 62: Phoenix for Rubyists

REVERSE PROXY

RailsPhoenix

Page 63: Phoenix for Rubyists

ELIXIR & PHOENIX

•Performant

•Productive

•Functional

•You’re already halfway there

Page 64: Phoenix for Rubyists

SOME IMAGES & DIAGRAMS AND OTHER STUFF FROM…•https://www.toptal.com/erlang/a-cloud-at-the-lowest-level-built-in-erlang

•https://en.wikipedia.org/wiki/Moore%27s_law •https://theerlangelist.blogspot.in/2013/05/working-with-immutable-data.html

•https://www.amberbit.com/blog/2014/2/14/putting-ruby-on-rails-on-a-diet/

•https://www.technologyreview.com/s/601441/moores-law-is-dead-now-what/

THANKS!