0

I'm trying to understand the differences between the ADM and RDM.

The way I see it is the adM and RDM discussion all comes down to where you actually determine your workflow ( collaboration of objects). The RDM injects the data repository object and validation object into the constructors of the business object (model). The business object methods then define the workflow in making these objects collaborate.

The ADM passes all these collaborating objects (model, repository, validation object into the viewModel/controller etc. The methods of the viewmodel/controller define the workflow collab between objects.

Is this correct or am I missing something more fundamental?

caa
  • 406
  • 1
  • 8
  • 16

1 Answers1

4

I assume that RDM = Rich Domain Model. The main difference between ADM and RDM (which is in fact the 'real' domain model) is that the RDM models the business processes (problems and solutions for which the app was developed) as natural organic as it can.

A domain model models the behaviour of the business while an anemic model consists of basically POCOs which hold data, basically mimicking a db table. Those POCOs are then used almost in a procedural fashion, validated and processed by services (which in many cases are just static methods).

In a nutshell, an ADM consists in objects that hold no (or very little) behaviour, they act only as data bags, while the RDM models the business processes as accurate and natural as it can. Most of the time the anemic domain is a consequence of the db centric approach, where everything starts and revolves around a db.

Controllers, views and DI containers are just implementations details.

MikeSW
  • 16,140
  • 3
  • 39
  • 53