~/talk

Missing Guide to Service Objects in Rails

Talkat RailsConf 2021 · 2021-04-12..04-15· [frontend-architecture]
github:rvirani1
slides:none on file

Argues that service objects must show the actual sequence of steps and tradeoffs not just a label, demonstrating an OO OrderCreator class versus a functional organizer built with light-service and discrete actions, showing how the functional flow composes, supports fail and return without raising slow exceptions, and makes error handling via throw/catch clearer. Examples build a create-order pipeline that runs and reports success or structured failure, with performance and composability compared.

AI-written summary · about

  1. 0:00Start
  2. 4:01REAL Rails Code
  3. 4:26Put it in a model? Same Problem
  4. 17:14Functional Version continued
  5. 20:39Nested Conditionals
  6. 21:29Raising Exceptions
  7. 23:13Throw and Catch
  8. 26:41True/False
  9. 28:32Custom Classes
~/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.