Component-based Architectures in Ruby and Rails
summary
Walks through eight architectures from a single Rails app to namespaced modules, local path gems, Rails engines, an event counter engine and finally HTTP services, demonstrating concrete steps: extract component into a path gem, run its specs independently, embed as an engine with migrations and assets, refactor models into a single-purpose service class, publish the gem and swap a path reference for a versioned dependency; tests run in parallel and the refactorings verify they actually work.
AI-written summary · about
chapters (11)
- 0:00Start
- 2:10Give yourself a box so you can start thinking outside of it
- 11:07A higher level structure
- 15:16Provably independent tests
- 16:29The Rails component app
- 17:15Provable structure for Rails
- 21:35What code smell did you see?
- 22:55Clearer responsibilities
- 26:24Reduced surface area
- 27:27gem build event_counter..
- 28:25The HTTP SOA app
related talks
33mRefactoring Towards Component-based Rails Architectures
01h 28mGet started with Component-based Rails applications!
40mMonoliths Between Microservices
38mAll you need is Rails (Engines): Compartmentalising your Monolith
41m"Tackling complex architecture in Ruby"
37mHow I Architected My Big Rails App For Success
41mAPPLICATION ARCHITECTURE: BOUNDARIES, OBJECT ROLES, & PATTERNS
32mHow I architected my big Rails app for success!
