creekhiker
creekhiker

Reputation: 19

Creating a domain model

I am struggling with creating a domain model for a class. I have a basic understanding of domain models and their purpose however really have no idea where to begin on this.

"Consider the following description of the rules for meetings in a company:

Could someone help with creating a domain model representing this information?

Upvotes: 1

Views: 108

Answers (1)

qwerty_so
qwerty_so

Reputation: 36295

Basically (!) it's very simple. In a nutshell:

  • Just find out which business objects are mentioned.
  • Give each object a meaningful name.
  • Relate the objects appropriately.
  • Add attributes to the objects.
  • Find and list business rules.

Talking of objects is because you are analysing a business domain with concrete objects. You model these as classes in order to abstract them.

The difficulty are the details. You need to hold meetings with stakeholders to find all objects and to squeze the details out of them. Take for example an address or a person. Very common business objects. Everybody seems to know everything about it. But then you find details like: we're doing business in America and China and they have completely differnt way to address someone. There are even local differences. Or a middle name is common in America while Germany does not really have one. And so on and so forth.

So in detail for your simple domain model:

  • you have Meeting, Agenda and Person as business objects.
  • atttributes like A meeting has a unique identifier can be picked out. Whether that identifier is also an object can be discussed. Probably I would do and eventually just end with making it a simple string.
  • How to relate the objects takes a bit of thinking. I leave that to you.
  • Business rules like The vote can be "yea" can be added as constraints attached to objects or you create a table naming each rule according to a schema.

Upvotes: 1

Related Questions