Intern Track Roadmap

Rails MVC overview

This course explains Model-View-Controller as a design pattern, starting with its origin at Xerox PARC in 1979 and its use in Smalltalk-80. It covers what each role owns: the Model holds data and business rules, the View handles presentation, and the Controller coordinates between them. Lessons show why separation of concerns helps testing and change, discuss fat models versus service objects, and describe fat controllers, anemic models and duplicated logic. A small publish feature ties the three layers together.

What you'll learn

  • ✓The origin of MVC and the three roles it defines
  • ✓Which code belongs in the Model, the View and the Controller
  • ✓Why a re-rendered form needs status: :unprocessable_content with Turbo
  • ✓The trade-off between fat models and service objects
  • ✓How separation of concerns helps testing and lets one Model back several Views
  • ✓How to spot fat controllers, anemic models and duplicated logic
Free preview · Lesson 1 2 min read

What is MVC?

The web: request-response walked through the full path a Rails request takes: Puma, middleware, router, controller, model, view. This course looks at something narrower: MVC itself, as a design pattern rather than Rails plumbing.

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...