Slide 1

Slide 1 text

NIKOLAY SVERCHKOV @ssnickolay ANYTHING NEW RAILS 6?

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

#saintprubyconf @ssnickolay evilmartians.com

Slide 4

Slide 4 text

#saintprubyconf @ssnickolay

Slide 5

Slide 5 text

ANYTHING NEW RAILS 6?

Slide 6

Slide 6 text

ANYTHING IMPORTANT RAILS 6?

Slide 7

Slide 7 text

LET’S COMPARE!

Slide 8

Slide 8 text

HISTORY OF RELEASES RAILS *.0: FEATURE-X

Slide 9

Slide 9 text

#saintprubyconf @ssnickolay RAILS 2.0

Slide 10

Slide 10 text

#saintprubyconf @ssnickolay RAILS 2.0 Action Pack: Resources RESTful Action Pack: Multiview respond_to Action Pack: Security CRSF protection via protect_from_forgery Action Pack: Exception rescue_from

Slide 11

Slide 11 text

#saintprubyconf @ssnickolay RAILS 2.0 Active Record: Performance QUERY CACHE!

Slide 12

Slide 12 text

MVC 2010 RAILS 3.0

Slide 13

Slide 13 text

#saintprubyconf @ssnickolay RAILS 3.0 config.gem !-> Bundler ARel Railties, Active Model, …

Slide 14

Slide 14 text

#saintprubyconf @ssnickolay RAILS 3.0 MERGE OF MERB AND RAILS

Slide 15

Slide 15 text

#saintprubyconf @ssnickolay RAILS 2: LEGACY APP

Slide 16

Slide 16 text

#saintprubyconf @ssnickolay *RAILS 3.0: TRUE ActiveRecord 3.0.5 is twice as slow as ActiveRecord 2.3.2. In a simple benchmark within a clean rails framework it is 1.43 times slower.

Slide 17

Slide 17 text

#saintprubyconf @ssnickolay *RAILS 3.0: TRUE

Slide 18

Slide 18 text

#saintprubyconf @ssnickolay RAILS 4.0: MATURE

Slide 19

Slide 19 text

#saintprubyconf @ssnickolay RAILS 5.0: NOT ONLY HTML

Slide 20

Slide 20 text

#saintprubyconf @ssnickolay WHY WE SHOULD UPDATE OUR PROJECT? RAILS 4.* !=> RAILS 5.0

Slide 21

Slide 21 text

#saintprubyconf @ssnickolay RAILS 6.0 ❓❓

Slide 22

Slide 22 text

#saintprubyconf @ssnickolay RAILS 6.0 Parallel testing Multi DB Action Text Action Mailbox

Slide 23

Slide 23 text

#saintprubyconf @ssnickolay RAILS 6.0 gem ‘parallel_tests’ Parallel testing Multi DB Action Text Action Mailbox ⭐ 2,567

Slide 24

Slide 24 text

#saintprubyconf @ssnickolay RAILS 6.0 gem ‘parallel_tests’ gem ‘octopus’ Parallel testing Multi DB Action Text Action Mailbox ⭐ 2,349

Slide 25

Slide 25 text

#saintprubyconf @ssnickolay RAILS 6.0 gem ‘parallel_tests’ gem ‘octopus’ WYSIWYG Parallel testing Multi DB Action Text Action Mailbox

Slide 26

Slide 26 text

#saintprubyconf @ssnickolay RAILS 6.0 gem ‘parallel_tests’ gem ‘octopus’ WYSIWYG Parallel testing Multi DB Action Text Action Mailbox

Slide 27

Slide 27 text

#saintprubyconf @ssnickolay RAILS 6.0 gem ‘parallel_tests’ gem ‘octopus’ -- skip-action-text - - skip-action-mailbox Parallel testing Multi DB Action Text Action Mailbox

Slide 28

Slide 28 text

RAILS 6.0: WEBPACKER

Slide 29

Slide 29 text

#saintprubyconf @ssnickolay RAILS 6.0: CONTINUE USING SPROCKETS (╯°□°)╯︵ ┻━┻

Slide 30

Slide 30 text

ONE SKIP TO RULE THEM ALL

Slide 31

Slide 31 text

#saintprubyconf @ssnickolay $ rails new -- skip-rails

Slide 32

Slide 32 text

#saintprubyconf @ssnickolay $ rails new -- skip-rails Action Mailbox

Slide 33

Slide 33 text

#saintprubyconf @ssnickolay $ rails new -- skip-rails Action Mailbox Action Text

Slide 34

Slide 34 text

#saintprubyconf @ssnickolay $ rails new -- skip-rails Action Mailbox Action Text Sprockets

Slide 35

Slide 35 text

#saintprubyconf @ssnickolay $ rails new -- skip-rails Action Mailbox Action Text Sprockets Turbolinks

Slide 36

Slide 36 text

#saintprubyconf @ssnickolay ANYTHING NEW RAILS 6?

Slide 37

Slide 37 text

#saintprubyconf @ssnickolay NO ANYTHING NEW RAILS 6?

Slide 38

Slide 38 text

@ssnickolay Nikolay Sverchkov @ssnickolay THANK YOU! @evilmartians http://evl.ms/blog http://evl.ms/telegram

Slide 39

Slide 39 text

Rails 6 sucks

Slide 40

Slide 40 text

Rails 6 sucks who the hell does he think he is?

Slide 41

Slide 41 text

No content

Slide 42

Slide 42 text

Second Chance ANYTHING NEW RAILS 6?

Slide 43

Slide 43 text

#saintprubyconf @ssnickolay RAILS 6.0 MULTIPLE DATABASE SUPPORT

Slide 44

Slide 44 text

#saintprubyconf @ssnickolay gem ‘octopus’

Slide 45

Slide 45 text

#saintprubyconf @ssnickolay gem ‘octopus’ FOCUSED ON

Slide 46

Slide 46 text

#saintprubyconf @ssnickolay RAILS 6.0: MULTI DB MULTI DB = DB SHARDING = + + + VERTICAL OR HORIZONTAL PARTITIONING / REPLICATION

Slide 47

Slide 47 text

#saintprubyconf @ssnickolay RAILS 6.0: MULTI DB RAILS DID NOT HAVE ADEQUATE* MULTI DB SUPPORT *https://github.com/ankane/multiverse

Slide 48

Slide 48 text

#saintprubyconf @ssnickolay RAILS 6.0: MULTI DB MULTI DB !!= DATABASE SHARDING

Slide 49

Slide 49 text

#saintprubyconf @ssnickolay RAILS 6.0: MULTI DB MULTI DB !!= DATABASE SHARDING ?

Slide 50

Slide 50 text

#saintprubyconf @ssnickolay RAILS 6.0: MULTI DB MULTI DB !!= DATABASE SHARDING

Slide 51

Slide 51 text

#saintprubyconf @ssnickolay AT LEAST 12 HUGE PRS FROM @EILEENCODES RAILS 6.0: MULTI DB

Slide 52

Slide 52 text

#saintprubyconf @ssnickolay RAILS 6.0: !||TESTING PARALLEL UNIVERSAL TESTING

Slide 53

Slide 53 text

#saintprubyconf @ssnickolay RAILS 6.0: !||TESTING

Slide 54

Slide 54 text

#saintprubyconf @ssnickolay $ rspec N PROCESSES HOW ‘parallel_tests’ WORKS

Slide 55

Slide 55 text

#saintprubyconf @ssnickolay HOW ‘parallel_tests’ WORKS $ rspec $ rspec spec/group1 $ rspec spec/group3 N PROCESSES $ rspec spec/group2

Slide 56

Slide 56 text

#saintprubyconf @ssnickolay HOW ‘parallel_tests’ WORKS $ rspec $ rspec spec/group1 $ rspec spec/group3 THE FINAL OUTPUT N PROCESSES $ rspec spec/group2

Slide 57

Slide 57 text

#saintprubyconf @ssnickolay HOW ‘parallel_tests’ WORKS rspec OUTPUT parallel_tests rspec rspec

Slide 58

Slide 58 text

#saintprubyconf @ssnickolay HOW ‘Rails 6 ||’ WORKS OUTPUT Rails6 QUEUE TESTS EXECUTOR

Slide 59

Slide 59 text

#saintprubyconf @ssnickolay RAILS 6.0: !||TESTING PROCESSES OR THREADS?

Slide 60

Slide 60 text

#saintprubyconf @ssnickolay RAILS 6.0: !||TESTING BOTH!

Slide 61

Slide 61 text

BOTH! # default (as Github uses) parallelize(workers: 2, with: :processes) # or parallelize(workers: 2, with: :threads) RAILS 6.0: !||TESTING

Slide 62

Slide 62 text

#saintprubyconf @ssnickolay RAILS 6.0: !||TESTING *ONE SMALL PROBLEM

Slide 63

Slide 63 text

WHEN YOU RELEASE THE NEW FEATURE

Slide 64

Slide 64 text

#saintprubyconf @ssnickolay gem ‘parallel_tests’ contributors

Slide 65

Slide 65 text

gem ‘rails’ contributors

Slide 66

Slide 66 text

#saintprubyconf @ssnickolay RAILS 6.0: !||TESTING FAST TESTS OUT OF THE

Slide 67

Slide 67 text

USE BETTER SOLUTION FOR SPEEDING UP TESTS TEST-PROF WE ARE WATCHING YOU github.com /palkan/test-prof

Slide 68

Slide 68 text

RAILS 6.0: ACTION MAILBOX

Slide 69

Slide 69 text

RAILS 6.0: ACTION TEXT

Slide 70

Slide 70 text

RAILS 6.0: ACTION [TEXT && MAILBOX] OUT OF THE

Slide 71

Slide 71 text

THE SMALL BUT SIGNIFICANT

Slide 72

Slide 72 text

RAILS 6.0: ACTION CABLE TESTING *ALSO IN RSPEC 4

Slide 73

Slide 73 text

#saintprubyconf @ssnickolay RAILS 6.0: BULK INSERTS # Insert multiple records, performing an upsert # when records have duplicate ISBNs Book.upsert_all([ { title: 'Rework', author: 'David', isbn: '1' }, { title: 'Eloquent Ruby', author: 'Russ', isbn: '1' } ], unique_by: { columns: %w[ isbn ] }) *gem ‘activerecord-import`

Slide 74

Slide 74 text

#saintprubyconf @ssnickolay RAILS 6.0: MULTI DB && BULK INSERT && PARALLEL TESTING OUT OF THE

Slide 75

Slide 75 text

#saintprubyconf @ssnickolay RAILS 5.2 !-> RAILS 6.1 !-> … … !-> carrierwave ‘active_storage’

Slide 76

Slide 76 text

BUT ON THE OTHER HAND…

Slide 77

Slide 77 text

#saintprubyconf @ssnickolay RAILS != RUBY ☠ ‘octopus’ ☠ ‘multiverse’ ☠ ‘parallel_tests’ ☠ ‘activerecord-import’

Slide 78

Slide 78 text

RAILS 6.0: B-SIDES AND RARITIES evilmartians.com/chronicles

Slide 79

Slide 79 text

#saintprubyconf @ssnickolay RAILS 6.0: OTHER https://bogdanvlviv.com/posts/ruby/rails/what-is-new-in-rails-6_0.html#other-links

Slide 80

Slide 80 text

@bogdanvlviv COMMUNITY WE SHOULD BE GRATEFUL FOR THE WORK THEY DO A HUGE JOB

Slide 81

Slide 81 text

@bogdanvlviv COMMUNITY WE SHOULD BE GRATEFUL FOR THE WORK THEY DO

Slide 82

Slide 82 text

#saintprubyconf @ssnickolay expect(Rails6).to be_revolutionary RSpec!::Expectations!::ExpectationNotMetError: expected: revolutionary value got: evolutionary RAILS 6.0: EXPECTATIONS

Slide 83

Slide 83 text

#saintprubyconf @ssnickolay FRESH BLOOD LIKE… RAILS 7.0?: REVOLUTION

Slide 84

Slide 84 text

#saintprubyconf @ssnickolay RAILS 7.0?: REVOLUTION

Slide 85

Slide 85 text

#saintprubyconf @ssnickolay RAILS 7.0?: REVOLUTION VIEWS ECTO CONTEXTS

Slide 86

Slide 86 text

#saintprubyconf @ssnickolay RAILS 7.0?: REVOLUTION VIEWS ECTO CONTEXTS

Slide 87

Slide 87 text

I am thinking about the Rails future will their community accept

Slide 88

Slide 88 text

I am thinking about the Rails future Have you heard about Hanami?

Slide 89

Slide 89 text

#saintprubyconf @ssnickolay RAILS 3.0 MERGE OF MERB AND RAILS

Slide 90

Slide 90 text

#saintprubyconf @ssnickolay RAILS 7.0 ??? MERGE OF HANAMI AND RAILS

Slide 91

Slide 91 text

#saintprubyconf @ssnickolay RAILS 7.0 ??? MERGE OF HANAMI AND RAILS

Slide 92

Slide 92 text

#saintprubyconf @ssnickolay I ♥ RAILS

Slide 93

Slide 93 text

#saintprubyconf @ssnickolay I RAILS DEVELOPERS*

Slide 94

Slide 94 text

#saintprubyconf @ssnickolay I RAILS DEVELOPERS*

Slide 95

Slide 95 text

#saintprubyconf @ssnickolay OSS PROJECT’S COMMUNITY I WANT FEATURE X DON'T TOUCH ANYTHING CAN I USE IT ON WINDOWS? YOU ARE DEVELOPING TOO SLOWLY. I LEAVE! AGAIN BREAKING CHANGES. GO TO HELL! YOUR DOCS IS OUT OF DATE. DOES NOT WORK WITH RUBY 1.9.3

Slide 96

Slide 96 text

#saintprubyconf @ssnickolay OSS PROJECT’S COMMUNITY I WANT FEATURE X YOU ARE DEVELOPING TOO SLOWLY. I LEAVE! AGAIN BREAKING CHANGES. GO TO HELL! YOUR DOCS IS OUT OF DATE. DOES NOT WORK WITH RUBY 1.9.3 WE MISS YOU NICK CAN I USE IT ON WINDOWS?

Slide 97

Slide 97 text

#saintprubyconf @ssnickolay OSS PROJECT’S COMMUNITY I WANT FEATURE X DON'T TOUCH ANYTHING YOU ARE DEVELOPING TOO SLOWLY. I LEAVE! AGAIN BREAKING CHANGES. GO TO HELL! YOUR DOCS IS OUT OF DATE. DOES NOT WORK WITH RUBY 1.9.3 DUKE NUKEM CAN I USE IT ON WINDOWS?

Slide 98

Slide 98 text

#saintprubyconf @ssnickolay DHH IS COOL

Slide 99

Slide 99 text

#saintprubyconf @ssnickolay https://rubyonrails.org/doctrine/

Slide 100

Slide 100 text

#saintprubyconf @ssnickolay QUIZ*

Slide 101

Slide 101 text

DHH HAS NEVER BEEN IN RUSSIA

Slide 102

Slide 102 text

#saintprubyconf @ssnickolay ANYTHING NEW RAILS 6?

Slide 103

Slide 103 text

#saintprubyconf @ssnickolay ANYTHING NEW RAILS 6? NO

Slide 104

Slide 104 text

#saintprubyconf @ssnickolay ANYTHING NEW RAILS 6? BUT

Slide 105

Slide 105 text

#saintprubyconf @ssnickolay ANYTHING NEW RAILS 6? YES

Slide 106

Slide 106 text

#saintprubyconf @ssnickolay vs

Slide 107

Slide 107 text

#saintprubyconf @ssnickolay vs JUST CHOOSE WHICH SIDE YOU ARE ON

Slide 108

Slide 108 text

@ssnickolay Nikolay Sverchkov @ssnickolay THANK YOU! @evilmartians http://evl.ms/blog http://evl.ms/telegram