{"embed":false,"podcast":"Full Stack Radio","podcast_slug":"Full-Stack-Radio","tags":[],"thumbnail_url":"https://images.transistor.fm/file/transistor/images/show/13470/full_1597943814-artwork.jpg","episode":"34: Matt Machuga - Dealing with Dependencies in Active Record Models","episode_slug":"Full-Stack-Radio-34-Matt-Machuga-Dealing-with-Dependencies-in-Active-Record-Models","description":"Topics include:\nAre facades and service location automatically bad?\nAre NounVerber classes anti-OO?\nAdding a layer of composition to create domain models with dependencies\nUsing method injection for a temporary dependency\nUsing optional parameters to improve testability\nCode snippets:\nOption 1: Facades/Service Location/Global Access\n\nOption 2: Moving the responsibility to a new class\n\nOption 3: Composing a new domain model\n\nOption 4a: Inject the dependency into the method\n\nOption 4b: Optional method injection w/global fallback\n\nLinks:\nMatt's blog\n\n\"Agent nouns are code smells\" by Peter Gillard-Moss\n\nNitpick CI, Adam's PSR-2 style checking service\n\n\"Dependency injection is not a virtue\" by DHH\n\nErie Day of Code, Matt's conference\nSponsored by Laracasts\n\n","release_date":"27 Jan 2016","episode_embed_code":"<iframe src=\"https://api.pastimeapp.com/embed/Full-Stack-Radio-34-Matt-Machuga-Dealing-with-Dependencies-in-Active-Record-Models\" height=\"170px\" width=\"100%\" style=\"width: 1px; min-width: 100%; border: 1px dashed rgba(0,0,0,0.1); border-radius: 10px\" frameborder=\"0\" scrolling=\"no\" loading=\"lazy\"></iframe>","episode_share_url":"https://api.pastimeapp.com/ep/Full-Stack-Radio-34-Matt-Machuga-Dealing-with-Dependencies-in-Active-Record-Models","podcast_share_url":"https://api.pastimeapp.com/pod/Full-Stack-Radio","audio_url":"https://media.transistor.fm/195242f2/b05eec39.mp3","ads":[],"meta":{"title":"Full Stack Radio: 34: Matt Machuga - Dealing with Dependencies in Active Record Models","description":"From Full Stack Radio. Topics include:\nAre facades and service location automatically bad?\nAre NounVerber classes anti-OO?\nAdding a layer of composition to create domain models with dependencies\nUsing method injection for a temporary dependency\nUsing optional parameters to improve testability\nCode snippets:\nOption 1: Facades/Service Location/Global Access\n\nOption 2: Moving the responsibility to a new class\n\nOption 3: Composing a new domain model\n\nOption 4a: Inject the dependency into the method\n\nOption 4b: Optional method injection w/global fallback\n\nLinks:\nMatt's blog\n\n\"Agent nouns are code smells\" by Peter Gillard-Moss\n\nNitpick CI, Adam's PSR-2 style checking service\n\n\"Dependency injection is not a virtue\" by DHH\n\nErie Day of Code, Matt's conference\nSponsored by Laracasts\n\n","image":"https://images.transistor.fm/file/transistor/images/show/13470/full_1597943814-artwork.jpg","twitter":{"card_type":"summary"}},"episode_data":{"id":645842943,"guid":"0da94cf1-e4c8-4e9d-bcda-19c6680804cb","slug":"Full-Stack-Radio-34-Matt-Machuga-Dealing-with-Dependencies-in-Active-Record-Models","title":"34: Matt Machuga - Dealing with Dependencies in Active Record Models","alias":null,"description":"Topics include:\nAre facades and service location automatically bad?\nAre NounVerber classes anti-OO?\nAdding a layer of composition to create domain models with dependencies\nUsing method injection for a temporary dependency\nUsing optional parameters to improve testability\nCode snippets:\nOption 1: Facades/Service Location/Global Access\n\nOption 2: Moving the responsibility to a new class\n\nOption 3: Composing a new domain model\n\nOption 4a: Inject the dependency into the method\n\nOption 4b: Optional method injection w/global fallback\n\nLinks:\nMatt's blog\n\n\"Agent nouns are code smells\" by Peter Gillard-Moss\n\nNitpick CI, Adam's PSR-2 style checking service\n\n\"Dependency injection is not a virtue\" by DHH\n\nErie Day of Code, Matt's conference\nSponsored by Laracasts\n\n","transcript":null,"deepgram":null,"categories":"[\"Technology\"]","duration":2323,"episode_number":null,"season":null,"episode_type":null,"release_date":"2016-01-27T13:12:00.000Z","audio_url":"https://media.transistor.fm/195242f2/b05eec39.mp3","image_url":null,"player_url":"/ep/Full-Stack-Radio-34-Matt-Machuga-Dealing-with-Dependencies-in-Active-Record-Models","valid":true,"accessTier":null,"created":null,"updated":"2023-08-15T08:59:26.238Z","podcastId":394,"podcast":{"id":394,"slug":"Full-Stack-Radio","name":"Full Stack Radio","alias":null,"network":null,"author":"Adam Wathan","rss_url":"https://simplecast.com/podcasts/279/rss","description":"A podcast for developers interested in building great software products. Every episode, Adam Wathan is joined by a guest to talk about everything from product design and user experience to unit testing and system administration.","categories":"[\"Technology\"]","itunes_type":null,"itunesTypeSource":null,"image_url":"https://images.transistor.fm/file/transistor/images/show/13470/full_1597943814-artwork.jpg","thumbnail_url":"https://images.transistor.fm/file/transistor/images/show/13470/full_1597943814-artwork.jpg","error":true,"errorSince":null,"errorReason":null,"feedChangedAt":null,"tagsEditedAt":null,"hiddenAt":null,"hiddenReason":null,"endedAt":null,"popularity":0,"language":null,"country":null,"countrySource":null,"created":"2016-09-14T09:23:52.106Z","updated":"2026-07-02T23:02:48.634Z","tags":[]},"captions":[]},"podcast_data":{"id":394,"slug":"Full-Stack-Radio","name":"Full Stack Radio","alias":null,"network":null,"author":"Adam Wathan","rss_url":"https://simplecast.com/podcasts/279/rss","description":"A podcast for developers interested in building great software products. Every episode, Adam Wathan is joined by a guest to talk about everything from product design and user experience to unit testing and system administration.","categories":"[\"Technology\"]","itunes_type":null,"itunesTypeSource":null,"image_url":"https://images.transistor.fm/file/transistor/images/show/13470/full_1597943814-artwork.jpg","thumbnail_url":"https://images.transistor.fm/file/transistor/images/show/13470/full_1597943814-artwork.jpg","error":true,"errorSince":null,"errorReason":null,"feedChangedAt":null,"tagsEditedAt":null,"hiddenAt":null,"hiddenReason":null,"endedAt":null,"popularity":0,"language":null,"country":null,"countrySource":null,"created":"2016-09-14T09:23:52.106Z","updated":"2026-07-02T23:02:48.634Z","tags":[]}}