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.

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:<a href="https://www.cloud66.com/" target="_blank" rel="noreferrer...

NOW PLAYING

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.

Everything's Coming Up Thrillhouse Four Finger Discount The official podcast of the Thrillhouse Simpsons Memes Super Group. Each week, admins Jack Nischler, Karina Martin and Ruby Zanetti discuss the latest happenings in the group, as well as their Simpsons fandom.Proudly brought to you by The Four Finger Discount Network. Explicit 暗黑森林 The Dark Forest 榮忠豪/Ruby 盧春如/Joanna Wang 王若琳 社會總是希望人人都活在明亮。但一旦人的黑暗面露出的時候,社會會怎麼反應? 人性的黑暗總是被壓抑的而不被允許顯露, 但若這些邪惡的行為無法被壓下來 會有什麼事情發生? 本播客想透過真實殺人案件與其他暗黑的故事來探索人的黑暗面,但就像暗黑的森林,在黑暗的樹枝之中還是看得到光芒,提醒人們黑暗之處還是有希望的存在。 除了只關注故事的黑暗,『暗黑森林』也會專注在人們對於彼此的關懷,同情,與自我保護的重要性。來吧!跟著主持人 榮忠豪/Joanna 王若琳/Ruby 盧春如 一起走進 「暗黑森林」 Powered by Firstory Hosting Explicit The Sugar Baby Confessionals Sara-Mae Tuson: Writer, editor and podcaster Each season we tackle a new story. The Sugar Baby Confessionals is a true story unfolding over two years. What if your best friend – your best, married friend – embraced the sugar baby lifestyle – not by necessity, but by choice? Sara-Mae Tuson's BFF, Ruby, did just that. Sexy? Scary? Judge for yourself.We follow two years of Ruby's life, so it's important to listen from Episode 1. In the Sugar Baby Confessionals, the girl talk gets candid as Sara-Mae and Ruby talk about love, sex and life as a Sugar Baby. Explicit Friday Afternoon Deploy: A Developer Podcast Lofty Labs Episodes and show notes available at friday.hirelofty.com. An unapologetic show about the culture and chaos of software engineering from the makers and breakers of digital products at Lofty Labs. We build software with Python and Django, Ruby and Rails, Golang, whatever frontend framework we're forced to use because it's popular this month, and anything else to get the job done right. Then on Friday afternoons we have a beer and talk about our regrets on this show. Explicit

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.

What is this episode about?

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...

Can I download this Ruby Rogues episode?

Yes, you can download this episode by clicking the download button on the episode player, or subscribe to the podcast in your preferred podcast app for automatic downloads.
URL copied to clipboard!