Single Responsibility Principle vs Anemic Domain Model anti-pattern

Rich Domain Model (RDM) and Single Responsibility Principle (SRP) are not necessarily at odds. RDM is more at odds with a very specialised subclassof SRP – the model advocating “data beans + all business logic in controller classes” (DBABLICC). If you read Martin’s SRP chapter, you’ll see his modem example is entirely in the domain … Read more

Rich vs Anemic Domain Model [closed]

The difference is that an anemic model separates logic from data. The logic is often placed in classes named **Service, **Util, **Manager, **Helper and so on. These classes implement the data interpretation logic and therefore take the data model as an argument. E.g. public BigDecimal calculateTotal(Order order){ … } while the rich domain approach inverses … Read more