Ruby Rogues

RR 409: Turning Fat Models Into Skinny POROs with Jason Swett


Listen Later

Sponsors
  • Sentry use code “devchat” for 2 months free
  • Triplebyte $1000 signing bonus
  • Redisgreen
Panel
  • Charles Max Wood
  • Dave Kimura
Special Guest: Jason SwettEpisode SummaryJason Swett is a former host on Ruby Rogues. Now he has his own show, Ruby Testing Podcast and runs the site codewithjason.com where he teaches Rails testing. Today, Jason discusses turning fat models into skinny POROs (Plain Old Ruby Objects). He once read an article that said you don’t have to put all your code into active record models, that you can create plain ruby objects. These can go into active models if you want, but you’re not limited to active record models, you can make your own classes. This realazition greatly impacted the way he structures his code.The panelists talk about the individual ways the structure their code. Jason discusses other structuring methods he has tried and gives some examples of using skinny POROs in the apps he works on. They discuss the pros and cons of using skinny POROs instead of active models, pros being it cleans up the model and makes testing easier, and the cons being it adds to a bit of overhead to the application, as somebody unfamiliar with the application might recreate parts if you don’t have an index.The panel discusses how to decide when you want to create a new PORO. They talk about each of their methods and discuss the the usefulness of token generators. They conclude that in order for skinny POROs to be effective in code, they must be well factored and organized, and that unfortunately some complexity in code is unavoidable.Links
  • POROs- Plain Old Ruby Objects
  • Model
  • Active record models
  • Namespace
  • Service objects
  • Value objects
  • CSS
  • Form object
  • Tokens
  • Initializer
  • Singleton object
PicksDave Kimura:
  • Reek
  • Kubernetes
Charles Max Wood:
  • Cloud66
  • Podwrench
  • Podcasting booth
  • New podcasts coming to DevChat-- if you want to revive a podcast that has stopped airing, contact Charles Max Wood
  • Programming Podcasters Slack chat
Jason Swett:
  • Practical Object Oriented Design in Ruby
  • Ruby Testing Podcast
  • Codewithjason.com
Special Guest: Jason Swett.

Advertising Inquiries: https://redcircle.com/brands

Privacy & Opt-Out: https://redcircle.com/privacy

Become a supporter of this podcast: https://www.spreaker.com/podcast/ruby-rogues--6102073/support.
...more
View all episodesView all episodes
Download on the App Store

Ruby RoguesBy Charles M Wood

  • 3.4
  • 3.4
  • 3.4
  • 3.4
  • 3.4

3.4

21 ratings


More shows like Ruby Rogues

View all
Software Engineering Radio - the podcast for professional software developers by se-radio@computer.org

Software Engineering Radio - the podcast for professional software developers

272 Listeners

The Changelog: Software Development, Open Source by Changelog Media

The Changelog: Software Development, Open Source

283 Listeners

JavaScript Jabber by Charles M Wood

JavaScript Jabber

235 Listeners

iPhreaks by Charles M Wood

iPhreaks

17 Listeners

Ruby Rogues by Charles M Wood

Ruby Rogues

45 Listeners

The Freelancers' Show by Charles M Wood

The Freelancers' Show

23 Listeners

The Ruby on Rails Podcast by Elise Shaffer

The Ruby on Rails Podcast

53 Listeners

Adventures in Angular by Charles M Wood

Adventures in Angular

33 Listeners

The Bike Shed by thoughtbot

The Bike Shed

121 Listeners

Software Engineering Daily by Software Engineering Daily

Software Engineering Daily

624 Listeners

React Native Radio by Jamon Holmgren, Robin Heinze, Mazen Chami

React Native Radio

59 Listeners

Soft Skills Engineering by Jamison Dance and Dave Smith

Soft Skills Engineering

268 Listeners

My JavaScript Story by Charles M Wood

My JavaScript Story

4 Listeners

JavaScript Jabber by Charles M Wood

JavaScript Jabber

61 Listeners

Adventures in Angular by Charles M Wood

Adventures in Angular

15 Listeners

Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

Syntax - Tasty Web Development Treats

982 Listeners

REWORK by 37signals

REWORK

210 Listeners

Remote Ruby by Chris Oliver, Andrew Mason

Remote Ruby

34 Listeners

Maintainable by Robby Russell

Maintainable

32 Listeners

The Stack Overflow Podcast by The Stack Overflow Podcast

The Stack Overflow Podcast

64 Listeners

Code and the Coding Coders who Code it by Drew Bragg

Code and the Coding Coders who Code it

6 Listeners

Rooftop Ruby Podcast by Collin Donnell, Joel Drapper

Rooftop Ruby Podcast

3 Listeners

IndieRails by Jess Brown & Jeremy Smith

IndieRails

5 Listeners

Dead Code by Jared Norman

Dead Code

0 Listeners