~/talk

Rails vs. Object Oriented Design

Talkat Ru3y Manor 3 · on Saturday, 2011-11-05· [ruby-on-rails, software-architecture]
slides:none on file

Rails encourages quick CRUD but often produces fat ActiveRecord models that mix persistence, presentation and payment logic; a real project showed a 1:2.5 code:test ratio, five test suites and 180 attendees as context. Practical fixes: extract an order_process + payment objects pair so payments are polymorphic and reusable in a GUI, wrap presentation in a presenter/decorator (Draper) to keep views thin, use custom validators and custom responders in Rails 3, and add folders via config.application.rb to hold plain Ruby objects.

AI-written summary · about

  1. 0:00Introduction
  2. 0:54Tom Stuart
  3. 3:11Disclaimer
  4. 8:59ActiveRecord
  5. 14:47View Layer
  6. 18:38View Decorator
  7. 19:33Custom Validators
  8. 24:20Further Reading
  9. 25:03Questions
~/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.