What’s the difference between Data Modelling and Domain Modelling?

Good question, the problem is that it depends on the definion of the terms, I think they differ slightly based on the sources. I would agree with previous answer – domain models are for describing the problem domain, at least the part you need to develop a solution. You describe all the various entities, their … Read more

What exactly is the difference between a data mapper and a repository?

Suppose your application manages Person objects, with each instance having name, age and jobTitle properties. You would like to persist such objects, retrieve them from the persistence medium and maybe update (say, on their birthday, increment the age) or delete. These tasks are usually referred to as CRUD, from Create, Read, Update and Delete. It … Read more

Iterator versus Stream of Java 8

There’s lots of performance advice here, but sadly much of it is guesswork, and little of it points to the real performance considerations. @Holger gets it right by pointing out that we should resist the seemingly overwhelming tendency to let the performance tail wag the API design dog. While there are a zillion considerations that … Read more

ORM Entities vs. Domain Entities under Entity Framework 6.0

I agree with the general idea of these posts. An ORM class model is part of a data access layer first and foremost (even if it consists of so-called POCOs). If any conflict of interests arises between persistence and business logic (or any other concern), decisions should always be made in favor of persistence. However, … Read more

Having Separate Domain Model and Persistence Model in DDD

Are there any reasons opinion 1) would be preferred to opinion 2) other than speeding up development and reusing code. Option 1 is just because of pure laziness and imagined increased development speed. It’s true that those applications will get version 1.0 built faster. But when those developers reach version 3.0 of the application, they … 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