简体   繁体   中英

What is the difference between a Domain model and a conceptual class diagram in UML

I have an assignment for school where I'm asked to represent the system of a company that I am to upgrade with a domain model and draw a conceptual class diagram with the four most important use cases of the system. I don't really understand the difference between the two, can someone help me?

In short

Domain model and a conceptual mean different things to different people. There is no universal authoritative definition of these terms.

Nevertheless, objectively a domain is more than interrelated classes. If we consider that conceptual means independent of any solution implementation, we can claim that a conceptual class diagram is a subpart of the domain model.

Some more arguments

A domain model describes the elements of the real word for which a software shall provide a solution.

For example, for a real estate application:

  • you'd have “business objects” such as real estate assets (houses, flats, …), owners, tenants, sellers, buyers, agents, contracts, payments, geographical regions, etc.
  • But you would also have domain logic, such as the lifecycle of things: at first a party can be a prospect for an asset, then an interested prospect after a visit, then a tenderer if a bid is submitted, the. a buyer if the bid is accepted. The domain model can also describe business rules, eg if a tenderer proposes a price below the price demanded by the seller, the agent has to insure agreement of the seller before continuing negotiations.
  • DDD practitioners would also remind us that domain entities and aggregates (the things) are related to domain events that express what happens to entities and aggregates.

Hence, a domain is more than interrelated classes. If you're bot convinced, imagine a Model-View-Controller application where the Model would ignore the business logic: would it be useful?

The term “conceptual” means something abstract that is independent of any concrete implementation. In this regard, a conceptual class diagram refers in principle to a diagram of classes that describes the domain, independently of any concrete/implementable solution.

As a consequence, a conceptual class diagram in UML only describes a static subpart of the domain model. Because by construction, the class diagram is designed for representing the static structure of classes. UML foresees other diagrams to describe the dynamic aspects of a system or its domain, such as activity diagrams, sequence diagrams or state diagrams, that allow to focus on some dynamic parts of the domain.

So a conceptual class diagram can only be a part of the domain model.

You'll nevertheless find articles and peers who use the term “ domain model ” to refer to the “ model of the entities of a domain ”. This is a misleading shortcut in the language.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM