The Misconception About Models
summary
Central claim: a model is a code representation of something outside your codebase, not a folder or pattern slogan. Examples use Rails/ActiveRecord, Sinatra, Stripe/payments, headless CMS and service objects; ActiveRecord is a row in a SQL table and therefore one kind of model. At small scale everything can live in models, but at scale (350 models and 50 service integrations) organization matters. A payments API is implemented as a service/plain Ruby object and it works; not every model needs a database.
AI-written summary · about
chapters (8)
- 0:00Models and misconceptions
- 4:28What is a model
- 7:17Code vs Active Record
- 10:07MVC non-model parts
- 12:33Service objects as models
- 16:24Where models live
- 20:39Model granularity
- 24:54Q&A
related talks
37mPatters to deal with big ActiveRecord models
31mWhat Comes After MVC
46mRails as a piece of birthday cake
35mRails vs. Object Oriented Design
41mOff the Tracks - Challenging the Rails Mindset
31mLearn to Make an API-Backed Model with
22mBryan's ActieModel Extravaganza
31mThe History of Rails in 10 Blog Posts
