Senior Track Roadmap

Architecture: private engines

This course examines Rails engines and internal gems through one Rails application. It starts with the table_name_prefix declarations in four namespaces, which 23 of 24 models override. It explains what an engine is and what isolate_namespace does and does not do, then works through what changes if Catalog becomes an engine. It compares four boundary levels (namespace, engine, versioned gem, service), covers path, git and registry gems, and ends with a decision: no engines, no gems, plus a ten-line architecture spec and an ADR.

What you'll learn

  • ✓How table_name_prefix and isolate_namespace work, and what they leave unprotected
  • ✓What converting a context into an engine changes and what stays the same
  • ✓How namespaces, engines, versioned gems and services compare in enforcement and cost
  • ✓The differences between path, pinned git ref and registry gems
  • ✓How a ten-line architecture spec checks context boundaries
  • ✓How to record the decision in an ADR with conditions for revisiting it
Free preview · Lesson 1 4 min read

The engine convention already here

Four files in this application declare a Rails engine convention. Twenty-three models decline it. That's the whole starting point.

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...