Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The History of Rails in 10 Blog Posts

The History of Rails in 10 Blog Posts

Calling nostalgic veterans and newbies alike! We’re traveling through time on a tour of some of the most influential blog posts to hit the Rails community over the past two decades. With stops at iconic locations including in testing, service objects, and JavaScript, you won't want to miss it! Bring your chrono-passport and see you in 2003!

Originally given at RailsConf Philadelphia in 2025

Avatar for Joël Quenneville

Joël Quenneville

July 10, 2025
Tweet

More Decks by Joël Quenneville

Other Decks in Technology

Transcript

  1. Context Rails has been out for 3 years Joël is

    just getting started with web dev Common dev is single file PHP scripts + FileZilla People are starting to build serious apps
  2. Jamis suggests In the model Not in the controller Not

    in the view (like old-school PHP)
  3. Impact "fat models" and "skinny controllers" become terms Helped define

    what MVC means in the context of Rails Opened the conversation on where logic should go Emphasized the model layer is where the interesting parts of your app should be
  4. Value Object class Rating include Comparable def initialize(letter) @letter =

    letter end def <=>(other) to_s <=> other.to_s end def better_than?(other) self > other end # to_s, hash, eql?, and self.from_cost end
  5. Form Object class Signup # [elided] including ActiveModel modules and

    defining attributes def save! if valid? persist! true else false end end def persist! @company = Company.create!(company_name) @user = @company.users.create!(name: name, email: email) end end
  6. Service Object class UserAuthenticator def initialize(user) @user = user end

    def authenticate(unencrypted_password) return false unless @user if Bcrypt::Password.new(@user.password_digest) == unencrypted_password @user else false end end end
  7. Conditions to Consider a Service Object The action is complex

    (e.g. closing books at the end of accounting period) The action reaches across multiple models The action is not a core concern of the underlying model There are multiple ways of doing the action (strategies)
  8. 10 Big Ideas from the Rails community There are patterns

    beyond ActiveRecord Use Rails defaults for best results Duplication is cheaper than the wrong abstraction Apps should be environment-independent Tune processes/threads for better performance Monoliths should be your default starting architecture Service objects give up the benefits of the OO paradigm HTML over the wire is the best balance between interactivity and effort Most logic goes in the model layer Tests are more readable when setup is inline
  9. Joël Quennville your tour guide thoughtbot Principal Developer & blog

    author Co-host Bike Shed podcast bikeshed.fm @joelquen
  10. List of Blog posts weblog.jamisbuck.org/2006/10/18/skinny-controller-fat-model thoughtbot.com/blog/waiting-for-a-factory-bot codeclimate.com/blog/7-ways-to-decompose-fat-activerecord-models dhh.dk/2012/rails-is-omakase.html sandimetz.com/blog/2016/1/20/the-wrong-abstraction 12factor.net

    speedshop.co/2017/10/12/appserver.html martinfowler.com/bliki/MonolithFirst.html codewithjason.com/rails-service-objects radanskoric.com/articles/hotwire-or-frontend-framework 1 2 3 4 5 6 7 8 9 10