Design Patterns · Middle · Question 49 of 75

What is an "anemic model", and why is it criticized?

Explanation

Fowler calls it an anti-pattern in OOP: data and the rules for changing it are separated, so invariants are easy to break. On a functional-style frontend, "data + pure functions side by side in one module" is a reasonable compromise, as long as the rules are concentrated in one place.

Further reading

Problem with a question

Design Patterns · Middle · question 49

Test yourself

Take the Design Patterns · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz