Laravel Tutorials / updated: August 06, 2014

How We Code: ORMs and Anemic Domain Models

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.

Laravel News Partners

Newsletter

Join the weekly newsletter and never miss out on new tips, tutorials, and more.