Simple and Elegant Rails Code with Functional Style
summary
A concrete claim: moving parsing and business logic into tiny, stateless actions lowers complexity and speeds testing. Tools used include flog to measure complexity (a real class showed ~2,700 lines and 25–206 line methods and project scores like 25,902 points) and a tiny gem light-service (organizers + actions). Results: service class averages drop from ~71 to 13.9, tests run much faster, reuse across flows is straightforward, and small classes replace brittle 2,500-line models so maintenance actually gets easier.
AI-written summary · about
chapters (10)
- 0:00Start
- 7:09THE EXAMPLE.
- 12:00LOGIC OUTSIDE OF RAILS.
- 14:37IS IT BETTER?
- 15:05ONLY for_track IS PUBLIC
- 20:37WORKFLOW. SERIES OF ACTIONS
- 24:22ACTION EXECUTED.
- 27:49WORD OF WARNING
- 28:451. CONTROLLER
- 31:02SUMMARY
related talks
36mIn Relentless Pursuit of REST
39mExploring Rails anti-patterns
42mLightweight Web Services
36m"Business Logic in Ruby"
31mAn Optimistic Proposal for Making Horrible Code... Bearable
40mWorkshop - Simplifying Code: Monster to Elegant in Less Than 5 steps
28mNitty Gritty Service Building
30mYour Service Layer Needn't be Fancy, It Just Needs to Exist
