Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I validate the class diagram for a given domain?

I am working on car dealership business domain model/UML class diagram.

I am new to modeling, so I would like to know how to validate the class diagram. It's very important for me to have an appropriate, if not 100 percent correct, class diagram to use further development (use cases, etc.).

Is it possible to build a completely incorrect model? Or are there only appropriate and less appropriate models?

If I have a Customer associated with SalesTeam modeling a customer being served by SalesTeam, is that wrong? I have seen in examples of Customer being associated with Order, Order with ItemOrder and ItemOrder with ItemInventory. Where the SalesTeam or Staff is associated with Order.

How do I validate my model and relationships?

like image 882
user29312 Avatar asked Oct 19 '08 00:10

user29312


People also ask

What can validate UML diagrams?

In UML models, you can validate the syntax of a constraint that was defined by using Object Constraint Language (OCL). You can also express the body of a constraint using a natural language such as English, a programming language, or a mathematical notation.

What is a domain class diagram?

Definition. Class Diagram provides an overview of the target system by describing the objects and classes inside the system and the relationships between them. It provides a wide variety of usages; from modeling the domain-specific data structure to detailed design of the target system.

How do you identify a class diagram method?

On a class diagram, public messages (and any public attributes) are shown with a plus sign ( ) in front of them. Methods also have parentheses after them, indicating that data may be passed as parameters along with the message. The message parameters, as well as the type of data, may be included on the class diagram.


2 Answers

To validate domain models, do the following.

  1. Write use cases. During the writing, make sure you're using nouns and verbs in a consistent way. To be sure that your nouns make sense, be sure to record notes in the domain model.

  2. Walk through each use case, following along on your domain model. At the entities there? Relationships required for navigation? Attributes of each entity?

Since it's a domain model, try to avoid describing things as classes -- they're usually real-world entities.

For example "customer entity in direct relationship with sales team entity" is something you'll learn from the use cases. For example, customers are associated with orders, but the order is created by the sales team. So, you have two navigation paths between customer and order: direct and via the sales team. Both appear (to me) to be true.

You must compare your domain model with your use cases to be sure both agree.

like image 182
S.Lott Avatar answered Nov 14 '22 22:11

S.Lott


The short answer is that this is not very important.

Use your domain class diagrams to keep a note of what you think is in the domain, that is all. It is not your god, and it will not hurt you to change it as you go.

like image 32
Marcin Avatar answered Nov 14 '22 21:11

Marcin