How We Code: ORMs and Anemic Domain Models
Published on by Eric L. Barnes
Chris Fideo writes:
In this article, I’m going to cover an example of implementing some business logic in our usual Active Record patterns, and then I’ll show how the same logic can be applied using the Data Mapper pattern. In both cases, we’ll see how we can move our business logic into our business entities, thus avoiding anemic business domain. We’ll also cover pros and cons of the two styles of ORMs and how they affect the way we write our code.
Eric is the creator of Laravel News and has been covering Laravel since 2012.