Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Little Engines That Could

The Little Engines That Could

Rails Engines. It’s more than just a cute name made up of two words both related to trains.

Are they plug-ins? Are they gems? When do we use them? How do we implement them? Why aren’t they used more often?

Those are the questions I wish were answered for me when I first learned about Rails Engines. Inspired by Wired’s Explain In 5 Levels series, we will explore Rails Engines and address these quandaries using a variety of techniques, breaking down what engines are and how and when to use them.

4319781a6711d04355dd81601bf1aca4?s=128

Mina Slater

May 24, 2022
Tweet

Other Decks in Programming

Transcript

  1. The Little Engines That Could RailsConf 2022 🚂

  2. 👋 👋 👋 She/her Rails Developer : @minar528 Hi! I’m

    Mina!
  3. The Little Engines That Could RailsConf 2022 Three ways to

    understanding 🚂
  4. @minar528 RailsConf 2022 @minar528 💭

  5. @minar528 RailsConf 2022 🤨

  6. @minar528 RailsConf 2022 🚂 👀

  7. @minar528 RailsConf 2022 🎉 🚂

  8. @minar528 RailsConf 2022 🎙

  9. @minar528 RailsConf 2022 🔎

  10. RailsConf 2022 @minar528

  11. RailsConf 2022 @minar528 🤹

  12. RailsConf 2022 @minar528 🤹

  13. RailsConf 2022 @minar528 🤹

  14. 🤹 RailsConf 2022 @minar528 What is an engine? What are

    its bene f its?
  15. 🤹 RailsConf 2022 @minar528 What is an engine? What are

    its bene f its? What makes it unique? Types of engines?
  16. 🤹 RailsConf 2022 @minar528 How to implement? How to test?

    What is an engine? What are its bene f its? What makes it unique? Types of engines?
  17. @minar528 RailsConf 2022 @minar528 @minar528 Level One Non-Technical

  18. RailsConf 2022 @minar528 🕵

  19. RailsConf 2022 @minar528 🚂 🕵

  20. RailsConf 2022 @minar528 🕵 🚂 ❓

  21. @minar528 RailsConf 2022

  22. RailsConf 2022 @minar528

  23. RailsConf 2022 @minar528

  24. @minar528 RailsConf 2022 Cannot operate alone Both need hosts

  25. @minar528 RailsConf 2022 Provides "superpowers" Both enhance their hosts

  26. @minar528 RailsConf 2022 Multiple Hosts Both can integrate with and

    adapt to di ff erent hosts
  27. RailsConf 2022 @minar528 Groot Rocket Drax

  28. RailsConf 2022 @minar528 🕵 ⁉

  29. @minar528 RailsConf 2022 Reusable Client wants to share the engine

  30. @minar528 RailsConf 2022 Reduce scope Client wants to split up

    the system
  31. @minar528 RailsConf 2022 Shorten test time Client wants to cut

    their test execution time
  32. 🤹 RailsConf 2022 @minar528 How to implement? How to test?

    What is an engine? What are its bene f its? What makes it unique? Types of engines?
  33. 🤹 RailsConf 2022 @minar528 How to implement? How to test?

    What is an engine? ✅ What are its bene f its? What makes it unique? Types of engines?
  34. 🤹 RailsConf 2022 @minar528 How to implement? How to test?

    What is an engine? ✅ What are its bene f its? ✅ What makes it unique? Types of engines?
  35. @minar528 RailsConf 2022 @minar528 @minar528 Level Two Early-Career Devs

  36. RailsConf 2022 @minar528

  37. RailsConf 2022 @minar528 ⁉

  38. RailsConf 2022 @minar528 🚂 🚄 vs.

  39. RailsConf 2022 @minar528 Rails::Application Rails::Engine 🚂 🚄 vs. 🚂 🚄

    vs.
  40. RailsConf 2022 @minar528 Rails::Application < Rails::Engine Rails::Engine 🚂 🚄 vs.

    🚂 🚄 vs.
  41. RailsConf 2022 @minar528 Rails::Application < Rails::Engine Also MVC Rails::Engine MVC

    🚂 🚄 vs. 🚂 🚄 vs.
  42. RailsConf 2022 @minar528 Rails::Application < Rails::Engine Also MVC Runs independently

    Rails::Engine MVC 🚂 🚄 vs. 🚂 🚄 vs.
  43. RailsConf 2022 @minar528 Rails::Application < Rails::Engine Also MVC Runs independently

    Rails::Engine MVC Nope. 🚂 🚄 vs. 🚂 🚄 vs.
  44. RailsConf 2022 @minar528 Rails::Application < Rails::Engine Also MVC Runs independently

    Gem f ile Rails::Engine MVC Nope. gemspec 🚂 🚄 vs. 🚂 🚄 vs.
  45. RailsConf 2022 @minar528 🚂 💎 vs.

  46. RailsConf 2022 @minar528 💎 Packaged and published 🚂 vs. 🚂

    vs.
  47. RailsConf 2022 @minar528 💎 Packaged and published CAN be packaged

    and published 🚂 vs. 🚂 vs.
  48. RailsConf 2022 @minar528 💎 Packaged and published CAN be packaged

    and published Rails only 🚂 vs. 🚂 vs.
  49. RailsConf 2022 @minar528 💎 Packaged and published Any Ruby project

    CAN be packaged and published Rails only 🚂 vs. 🚂 vs.
  50. RailsConf 2022 @minar528 🚂 🔌 vs.

  51. RailsConf 2022 @minar528 🔌 Subset of 🔌 🚂 vs. Includes

    🚂
  52. RailsConf 2022 @minar528 🔌 Subset of 🔌 Use with Rails

    🚂 vs. Includes 🚂 Use with Rails
  53. RailsConf 2022 @minar528 Rails Guides “An engine CAN be a

    plugin, and a plugin CAN be an engine.”
  54. @minar528 RailsConf 2022 ❓

  55. RailsConf 2022 @minar528 My PR to Rails documentation “All engines

    are plugins, but not all plugins are engines.”
  56. RailsConf 2022 @minar528 🔌 Subset of 🔌 Use with Rails

    MVC 🚂 vs. Includes 🚂 Use with Rails
  57. RailsConf 2022 @minar528 🔌 Subset of 🔌 Use with Rails

    MVC 🚂 vs. Includes 🚂 Use with Rails Model-level modi f ications
  58. RailsConf 2022 @minar528 🔌 Subset of 🔌 Use with Rails

    MVC 🚂 vs. Includes 🚂 Use with Rails Model-level modi f ications
  59. RailsConf 2022 @minar528

  60. RailsConf 2022 @minar528

  61. 🤹 RailsConf 2022 @minar528 How to implement? How to test?

    What makes it unique? Types of engines? What is an engine? ✅ What are its bene f its? ✅
  62. 🤹 RailsConf 2022 @minar528 How to implement? How to test?

    What makes it unique? ✅ Types of engines? What is an engine? ✅ What are its bene f its? ✅
  63. 🤹 RailsConf 2022 @minar528 How to implement? How to test?

    What makes it unique? ✅ Types of engines? ✅ What is an engine? ✅ What are its bene f its? ✅
  64. @minar528 RailsConf 2022 @minar528 @minar528 Level Three Rails Devs New

    To Engines
  65. RailsConf 2022 @minar528

  66. RailsConf 2022 @minar528

  67. RailsConf 2022 @minar528

  68. RailsConf 2022 @minar528

  69. RailsConf 2022 @minar528

  70. RailsConf 2022 @minar528

  71. RailsConf 2022 @minar528

  72. RailsConf 2022 @minar528

  73. RailsConf 2022 @minar528

  74. RailsConf 2022 @minar528

  75. RailsConf 2022 @minar528

  76. RailsConf 2022 @minar528

  77. RailsConf 2022 @minar528

  78. RailsConf 2022 @minar528

  79. RailsConf 2022 @minar528

  80. RailsConf 2022 @minar528

  81. RailsConf 2022 @minar528

  82. RailsConf 2022 @minar528

  83. @minar528 RailsConf 2022 🎉

  84. RailsConf 2022 @minar528

  85. RailsConf 2022 @minar528

  86. 🤹 RailsConf 2022 @minar528 How to implement? How to test

    & mount? What makes it unique? ✅ Types of engines? ✅ What is an engine? ✅ What are its bene f its? ✅
  87. 🤹 RailsConf 2022 @minar528 How to implement? ✅ How to

    test & mount? What makes it unique? ✅ Types of engines? ✅ What is an engine? ✅ What are its bene f its? ✅
  88. 🤹 RailsConf 2022 @minar528 What makes it unique? ✅ Types

    of engines? ✅ What is an engine? ✅ What are its bene f its? ✅ How to implement? ✅ How to test & mount? ✅
  89. @minar528 RailsConf 2022 🚂 💕

  90. @minar528 RailsConf 2022 RailsConf 2023?

  91. RailsConf 2022 @minar528 🚂 🧰 🛤

  92. RailsConf 2022 @minar528 🚂 🧰 🛤

  93. RailsConf 2022 @minar528 THANK YOU! 🥰 🖋 http://minaslater.blog 🎙 “Your

    TDD Treasure Map” - Aji Slater 🎙 “Come On In! Making Yourself At Home In A New Codebase” - Mercedes Bernard