0% found this document useful (0 votes)
35 views

What Is A Domain Model?

Domain models capture important business objects and relationships in a problem domain. They help conceptualize and communicate business rules. A simple domain model example shows classes for Person, Company, Role, and Car linked by associations. Domain models feature classes, attributes, associations, and rules to represent objects and relationships. They are developed through iterative refinement, identifying candidate classes and relationships from use cases, textual descriptions, and domain expertise.

Uploaded by

Piyush Papreja
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

What Is A Domain Model?

Domain models capture important business objects and relationships in a problem domain. They help conceptualize and communicate business rules. A simple domain model example shows classes for Person, Company, Role, and Car linked by associations. Domain models feature classes, attributes, associations, and rules to represent objects and relationships. They are developed through iterative refinement, identifying candidate classes and relationships from use cases, textual descriptions, and domain expertise.

Uploaded by

Piyush Papreja
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 12

What is a domain model?

A domain model captures the most important types of objects in the context of the business. The domain model represents the things that exist or events that transpire in the business environment. I. Jacobsen

Why do a domain model?


Gives a conceptual framework of the things in the problem space Helps you think focus on semantics Provides a glossary of terms noun based It is a static view - meaning it allows us convey time invariant business rules Foundation for use case/workflow modelling Based on the defined structure, we can describe the state of the problem domain at any time.

Simple domain model


Attribute
Person
first name : String last name : String salary

Association
+employee
1..*

Company
name

+employer
0..1

+owner

Role
<<Rule>> If a person is not employed by a company then they do not have a car.

Car
type name

Domain class

Features of a domain model


The following features enable us to express time invariant static business rules for a domain:o Domain classes each domain class denotes a type of object. o Attributes an attribute is the description of a named slot of a specified type in a domain class; each instance of the class separately holds a value. o Associations an association is a relationship between two (or more) domain classes that describes links between their object instances. Associations can have roles, describing the multiplicity and participation of a class in the relationship. o Additional rules complex rules that cannot be shown with symbology can be shown with attached notes.

Domain classes?
Each domain class denotes a type of object. It is a descriptor for a set of things that share common features. Classes can be:o Business objects - represent things that are manipulated in the business e.g. Order. o Real world objects things that the business keeps track of e.g. Contact, Site. o Events that transpire - e.g. sale and payment.

A domain class has attributes and associations with other classes (discussed below). It is important that a domain class is given a good description

How do I make a domain model?


Perform the following in very short iterations:
o o o o o o Make a list of candidate domain classes. Draw these classes in a UML class diagram. If possible, add brief descriptions for the classes. Identify any associations that are necessary. Decide if some domain classes are really just attributes. Where helpful, identify role names and multiplicity for associations. o Add any additional static rules as UML notes that cannot be conveyed with UML symbols. o Group diagrams/domain classes by category into packages.

Concentrate more on just identifying domain classes in early iterations !

Identifying domain classes?


An obvious way to identify domain classes is to identify nouns and phrases in textual descriptions of a domain. Consider a use case description as follows: 1. Customer arrives at a checkout with goods and/or services to purchase. 2. Cashier starts a new sale. 3. Cashier enters item identifier. 4. System records the sale line item and presents the item description, price and running total.

Identifying attributes ?
A domain class sounds like an attribute if: o It relies on an associated class for its identity e.g. order number class associated to an order class. The order number sounds suspiciously like an attribute of order. o It is a simple data type e.g. order number is a simple integer. Now it really sounds like an attribute!

Business Object Model (BOM) versus Domain Model?


The domain model is a variant of the RUP BOM. The BOM shows how business workers and business entities need to be related and how they need to collaborate in order to perform business. The domain model primarily uses class diagrams to show domain classes. A domain class is synonymous with a business entity in a BOM. Business workers are generally not elaborated. Domain classes do not have operations Domain classes are pulled out of the knowledge base of domain experts or from the knowledge represented in existing IT systems. Business entities, on the other hand, are derived by starting from the customers of the business, identifying business use cases etc.

Example
Router Name 1 * N/W Service FreePort Location * 1 Name DedicatedTo ValidIPRange ConnectivityType

* FreePlug Location * 1 1 H/W Warranty Maintainer StartDate EndDate * 0..1 * Machine SerialNumber HostName IPAddress Administrator SwitchPlug Memory LocationInRack Maintainer Warranty 0..1 * FreeSlot LocationInRack 1 1 Location Room Building X Y * 1 Switch/Hub Name * RackTypes Dimensions SlotNumber MachineDimensions

1 Network Interface Card MAC Address InterfaceType

0..1

Rack Name

* *

1 1 Manufacturer 1 * 1 Model 1 * 1..* Hardware Component Manufacturer Model

Mario Rack

19" Rack

Hard Disk

Monitor

Graphics Card

Sound Card

DVD

CD

CPU

Router Name

1 * N/W Service Name DedicatedTo ValidIPRange ConnectivityType

* Switch/Hub Name * 1 * Machine SerialNumber HostName IPAddress Administrator SwitchPlug Memory LocationInRack Maintainer Warranty 0..1

1 Network Interface Card MAC Address InterfaceType

0..1

Rack Name

Mario Rack

19" Rack

References
Business Modelling with UML Penker Analysis patterns Fowler
These books provide patterns for domain models.

You might also like