34: Matt Machuga - Dealing with Dependencies in Active Record Models
Full Stack Radio - En podcast av Adam Wathan
![](https://is1-ssl.mzstatic.com/image/thumb/Podcasts211/v4/a2/95/c3/a295c38e-96fe-b6de-b9d1-b9f3188b5414/mza_14852963107807971463.jpg/300x300bb-75.jpg)
Kategorier:
In this episode, Matt Machuga of Think Through Math returns to talk with Adam about design options when you find yourself wanting access to a collaborator in an Active Record or Eloquent model. They discuss the pros and cons of four specific designs, and finish off with their personal recommendations. Topics include: Are facades and service location automatically bad? Are NounVerber classes anti-OO? Adding a layer of composition to create domain models with dependencies Using method injection for a temporary dependency Using optional parameters to improve testability This episode is brought to you by Laracasts.