~/talk

Your Service Layer Needn't be Fancy, It Just Needs to Exist

Talkat RailsConf 2022 · 2022-05-17..05-19· [frontend-architecture, ruby-on-rails]
slides:none on file

Argues for a simple Ruby on Rails service layer (plain classes and methods in app/services) instead of stuffing business rules into controllers or ActiveRecord callbacks, showing a concrete WidgetCreation class that queues jobs, emails admins, and updates sales notifications. Uses Rails autoloading and keeps ActiveRecord validations where they belong. Result is smaller controllers, easier tests, isolated changes that actually scale in real apps, and incremental organization via private methods, extracted services, namespaces, and optional lightweight base-service utilities.

AI-written summary · about

  1. 0:00The problem with controllers
  2. 3:00Pitfalls of callbacks
  3. 5:18Understanding Rails roles
  4. 7:24Managing business logic
  5. 10:18Introducing the service layer
  6. 12:24Implementing services
  7. 14:32Stability and testing benefits
  8. 17:42Reconciling trade-offs
  9. 19:29Scaling and organizing
  10. 22:17Conclusion and advice
  11. 25:29Q&A session
~/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.