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

EPISODE · Apr 17, 2019 · 50 MIN

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

from Ruby Rogues · host Charles M Wood

SponsorsSentry use code “devchat” for 2 months freeTriplebyte $1000 signing bonusRedisgreenPanelCharles Max WoodDave KimuraSpecial 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.LinksPOROs- Plain Old Ruby ObjectsModelActive record modelsNamespaceService objectsValue objectsCSSForm objectTokensInitializerSingleton objectPicksDave Kimura:ReekKubernetesCharles Max Wood:Cloud66PodwrenchPodcasting boothNew podcasts coming to DevChat-- if you want to revive a podcast that has stopped airing, contact Charles Max WoodProgramming Podcasters Slack chatJason Swett:Practical Object Oriented Design in RubyRuby Testing PodcastCodewithjason.comSpecial Guest: Jason Swett. 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.

Episode metadata supplied by the publisher feed · Published Apr 17, 2019

Embed this episode

Ready to play

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

0:00 50:28

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

No similar episodes found.

Frequently Asked Questions

How long is this episode of Ruby Rogues?

This episode is 50 minutes long.

When was this Ruby Rogues episode published?

This episode was published on April 17, 2019.

Can I download this Ruby Rogues episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.
URL copied to clipboard!