Ruby Rogues
RR 353: Removing Business Logic from Rails Controllers with Aaron Sumner
Tue, 13 Mar 2018
Panel: Charles Max WoodDavid Richards Special Guests: Aaron SumnerIn this episode of Ruby Rogues, the panel discusses removing business logic from Rails controllers with Aaron Sumner. Aaron is a long time Ruby developer, using mostly Rails, writes a blog called Everyday Rails, and most people know him from his book, Everyday Rails Testing with RSpec: A practical approach to test-driven development. They discuss service objects, the pros and cons of using them, and they emphasize not trying to change something all at once, but gradually.In particular, we dive pretty deep on:Aaron introHow to test code without controller tests?The cons to controller testsSoft deprecationIf you’re not writing controller tests, what are you writing?Get the code out of the controllers and test it in more isolationService objectsProblem with a controller having a lot of business logic in itRailsCons of service objectsUsing a service object inside of a controllerPros of service objectsGetting smaller can happen step-wiseRe-architecting should happen gradually not all at onceWhen you write a service object, there is a flow to itHow writing his book impacted his viewsStart smallAnd much, much more!Links:Everyday RailsEveryday Rails Testing with RSpec: A practical approach to test-driven developmentRuby on Rails@EverydayRailsEveryday Rails [email protected]:CharlesThe 12 Week Year by Brian P. Moran and Michael LenningtonRubyHACK ConferenceDavidReady Player One by Ernest ClineAaronNo codeDeleting code30 for 30 PodcastSpecial Guest: Aaron Sumner. Advertising Inquiries: https://redcircle.com/brandsPrivacy & Opt-Out: https://redcircle.com/privacyBecome a supporter of this podcast: https://www.spreaker.com/podcast/ruby-rogues--6102073/support.
No persons identified in this episode.