~/talk

Let’s Extract a Class: The Single Responsibility Principle and Design Patterns

Talkat Rocky Mountain Ruby 2023 · 2023-10-05..10-06· [career-development]
slides:none on file

Starts from a concrete signup flow that moves email confirmation and signup rules out of controllers and models into a UserSignup class, which reduces controller surface area, speeds tests and absorbs branching like admin skips. Shows form objects that create user plus waiver transactionally, policies for access rules, decorators for views, and a repository that eliminates N+1 by repository batching external breed lookups. Recommends ADRs and a proof of concept to introduce changes.

AI-written summary · about

  1. 0:00Introduction to code design
  2. 1:01Standard Rails MVC patterns
  3. 2:23The limitations of thick models
  4. 5:32Extracting business logic
  5. 9:56Presenters and decorators
  6. 11:47Form objects
  7. 13:51Service objects and policies
  8. 15:48Query objects
  9. 16:44Value objects
  10. 18:47Repositories
  11. 22:05Architectural principles
  12. 24:00Leading team changes
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.