Get started with Component-based Rails applications!
summary
Claims that componentizing a Rails monolith actually reduces cognitive load and test time, and shows how to do it: extract a domain into a predictor gem by moving models into lib, require_relative the classes, add rspec as a dev dependency, and run tests inside‑out. Uses mountable engines for persistence, keeps one migration per table, exposes test helpers from engines, and fixes bundler pitfalls with a path do block. Extraction finishes in minutes and yields faster, smaller test suites.
AI-written summary · about
chapters (23)
- 0:00Introduction
- 1:30Who is Stefan Hagen
- 2:47Benefits of componentbased Rails
- 7:49Example App
- 8:31App Structure
- 13:10Unpublished Gems
- 17:46Prediction Engine
- 28:23Predictor Component
- 31:18Fixing the namespace
- 34:23Fixing the folder structure
- 36:23Creating teams
- 44:23Clean up
- 45:23Add predictor
- 47:23What happened here
- 48:23How I shouldnt use Texico
- 49:23Test breaking
- 50:23Removing predictor
- 51:23Main app
- 53:23Remove dependencies
- 55:23Dont entangle
- 56:23Smash it together
- 57:23Separate UI
- 58:23Components
related talks
33mRefactoring Towards Component-based Rails Architectures
32mComponent-based Architectures in Ruby and Rails
34m"Taming your Rails monolith"
38mAll you need is Rails (Engines): Compartmentalising your Monolith
35mWrangling Large Rails Codebases
41mMorning Keynote
40mMonoliths Between Microservices
34mViewComponents in the Real World
