Anything new Rails 6?

Anything new Rails 6?

Rails 6 should have been released on April 30 at RailsConf 2019.
Instead of going over each and every new feature, we will take a more general look at the direction where Rails is heading and why do we need this new release that does not promise anything world-shaking.

Ee8543e8f5554aaeabb6d140fa07b919?s=128

Nikolay Sverchkov

June 02, 2019
Tweet

Transcript

  1. NIKOLAY SVERCHKOV @ssnickolay ANYTHING NEW RAILS 6?

  2. None
  3. #saintprubyconf @ssnickolay evilmartians.com

  4. #saintprubyconf @ssnickolay

  5. ANYTHING NEW RAILS 6?

  6. ANYTHING IMPORTANT RAILS 6?

  7. LET’S COMPARE!

  8. HISTORY OF RELEASES RAILS *.0: FEATURE-X

  9. #saintprubyconf @ssnickolay RAILS 2.0

  10. #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
  11. #saintprubyconf @ssnickolay RAILS 2.0 Active Record: Performance QUERY CACHE!

  12. MVC 2010 RAILS 3.0

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

    Model, …
  14. #saintprubyconf @ssnickolay RAILS 3.0 MERGE OF MERB AND RAILS

  15. #saintprubyconf @ssnickolay RAILS 2: LEGACY APP

  16. #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.
  17. #saintprubyconf @ssnickolay *RAILS 3.0: TRUE

  18. #saintprubyconf @ssnickolay RAILS 4.0: MATURE

  19. #saintprubyconf @ssnickolay RAILS 5.0: NOT ONLY HTML

  20. #saintprubyconf @ssnickolay WHY WE SHOULD UPDATE OUR PROJECT? RAILS 4.*

    !=> RAILS 5.0
  21. #saintprubyconf @ssnickolay RAILS 6.0 ❓❓

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

    Action Mailbox
  23. #saintprubyconf @ssnickolay RAILS 6.0 gem ‘parallel_tests’ Parallel testing Multi DB

    Action Text Action Mailbox ⭐ 2,567
  24. #saintprubyconf @ssnickolay RAILS 6.0 gem ‘parallel_tests’ gem ‘octopus’ Parallel testing

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

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

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

    - - skip-action-mailbox Parallel testing Multi DB Action Text Action Mailbox
  28. RAILS 6.0: WEBPACKER

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

  30. ONE SKIP TO RULE THEM ALL

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

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

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

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

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

    Text Sprockets Turbolinks
  36. #saintprubyconf @ssnickolay ANYTHING NEW RAILS 6?

  37. #saintprubyconf @ssnickolay NO ANYTHING NEW RAILS 6?

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

  39. Rails 6 sucks

  40. Rails 6 sucks who the hell does he think he

    is?
  41. None
  42. Second Chance ANYTHING NEW RAILS 6?

  43. #saintprubyconf @ssnickolay RAILS 6.0 MULTIPLE DATABASE SUPPORT

  44. #saintprubyconf @ssnickolay gem ‘octopus’

  45. #saintprubyconf @ssnickolay gem ‘octopus’ FOCUSED ON

  46. #saintprubyconf @ssnickolay RAILS 6.0: MULTI DB MULTI DB = DB

    SHARDING = + + + VERTICAL OR HORIZONTAL PARTITIONING / REPLICATION
  47. #saintprubyconf @ssnickolay RAILS 6.0: MULTI DB RAILS DID NOT HAVE

    ADEQUATE* MULTI DB SUPPORT *https://github.com/ankane/multiverse
  48. #saintprubyconf @ssnickolay RAILS 6.0: MULTI DB MULTI DB !!= DATABASE

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

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

    SHARDING
  51. #saintprubyconf @ssnickolay AT LEAST 12 HUGE PRS FROM @EILEENCODES RAILS

    6.0: MULTI DB
  52. #saintprubyconf @ssnickolay RAILS 6.0: !||TESTING PARALLEL UNIVERSAL TESTING

  53. #saintprubyconf @ssnickolay RAILS 6.0: !||TESTING

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

  55. #saintprubyconf @ssnickolay HOW ‘parallel_tests’ WORKS $ rspec $ rspec spec/group1

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

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

  58. #saintprubyconf @ssnickolay HOW ‘Rails 6 ||’ WORKS OUTPUT Rails6 QUEUE

    TESTS EXECUTOR
  59. #saintprubyconf @ssnickolay RAILS 6.0: !||TESTING PROCESSES OR THREADS?

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

  61. BOTH! # default (as Github uses) parallelize(workers: 2, with: :processes)

    # or parallelize(workers: 2, with: :threads) RAILS 6.0: !||TESTING
  62. #saintprubyconf @ssnickolay RAILS 6.0: !||TESTING *ONE SMALL PROBLEM

  63. WHEN YOU RELEASE THE NEW FEATURE

  64. #saintprubyconf @ssnickolay gem ‘parallel_tests’ contributors

  65. gem ‘rails’ contributors

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

  67. USE BETTER SOLUTION FOR SPEEDING UP TESTS TEST-PROF WE ARE

    WATCHING YOU github.com /palkan/test-prof
  68. RAILS 6.0: ACTION MAILBOX

  69. RAILS 6.0: ACTION TEXT

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

  71. THE SMALL BUT SIGNIFICANT

  72. RAILS 6.0: ACTION CABLE TESTING *ALSO IN RSPEC 4

  73. #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`
  74. #saintprubyconf @ssnickolay RAILS 6.0: MULTI DB && BULK INSERT &&

    PARALLEL TESTING OUT OF THE
  75. #saintprubyconf @ssnickolay RAILS 5.2 !-> RAILS 6.1 !-> … …

    !-> carrierwave ‘active_storage’
  76. BUT ON THE OTHER HAND…

  77. #saintprubyconf @ssnickolay RAILS != RUBY ☠ ‘octopus’ ☠ ‘multiverse’ ☠

    ‘parallel_tests’ ☠ ‘activerecord-import’
  78. RAILS 6.0: B-SIDES AND RARITIES evilmartians.com/chronicles

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

  80. @bogdanvlviv COMMUNITY WE SHOULD BE GRATEFUL FOR THE WORK THEY

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

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

    RAILS 6.0: EXPECTATIONS
  83. #saintprubyconf @ssnickolay FRESH BLOOD LIKE… RAILS 7.0?: REVOLUTION

  84. #saintprubyconf @ssnickolay RAILS 7.0?: REVOLUTION

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

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

  87. I am thinking about the Rails future will their community

    accept
  88. I am thinking about the Rails future Have you heard

    about Hanami?
  89. #saintprubyconf @ssnickolay RAILS 3.0 MERGE OF MERB AND RAILS

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

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

  92. #saintprubyconf @ssnickolay I ♥ RAILS

  93. #saintprubyconf @ssnickolay I RAILS DEVELOPERS*

  94. #saintprubyconf @ssnickolay I RAILS DEVELOPERS*

  95. #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
  96. #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?
  97. #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?
  98. #saintprubyconf @ssnickolay DHH IS COOL

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

  100. #saintprubyconf @ssnickolay QUIZ*

  101. DHH HAS NEVER BEEN IN RUSSIA

  102. #saintprubyconf @ssnickolay ANYTHING NEW RAILS 6?

  103. #saintprubyconf @ssnickolay ANYTHING NEW RAILS 6? NO

  104. #saintprubyconf @ssnickolay ANYTHING NEW RAILS 6? BUT

  105. #saintprubyconf @ssnickolay ANYTHING NEW RAILS 6? YES

  106. #saintprubyconf @ssnickolay vs

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

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