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’

Slides:



Advertisements
Similar presentations
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’
Advertisements

Object-Oriented Analysis and Design CHAPTERS 8, 9: BASICS, INTRO TO DOMAIN MODELS 1.
Object Design Examples with GRASP
Jan 16, Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Iteration 1: a simple cash-only success scenario of Process Sale.
Copyright ©2004 Cezary Z Janikow 1 Domain Model n Visualization of entities and relationships n In UP presented as Class Diagrams – Classes, Relationships,
Chapter 9 DOMAIN MODELS Objectives
Solving the Problem Analysis & Design.
1 Domain Model Adding Associations Chapter 11 Applying UML and Patterns -Craig Larman.
6/8/991 Analysis Tuesday 09/14/99 Revised: September 11, 2000 (APM)
Domain model: visualizing concepts
NJIT 1 Domain Model Visualizing Concepts Chapter 9 Applying UML and Patterns Craig Larman.
Chapter 9 Domain Models 1CS6359 Fall 2012 John Cole.
9/18/011 Software Requirements Analysis and Design (Continued)
Domain Modeling Chandan R. Rupakheti and Steve Chenoweth Week 5, Day 1.
How to Make a Domain Model Tutorial
TK2023 Object-Oriented Software Engineering CHAPTER 6 SYSTEM SEQUENCE DIAGRAMS.
Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative Development Part III Elaboration Iteration I – Basic1.
Chapter 9 Domain Models. Domain Model in UML Class Diagram Notation A “visual dictionary”
Object-Oriented Analysis and Design
Last lecture. What is a Use Case Use cases are stories (scenarios) of how actors use (interact with) the system to fulfill his goal. Examples Process.
DOMAIN MODEL— PART 2: ATTRIBUTES SYS466. Looking For Potential Classes “Know the business”. Ask Questions Identify business concepts; filter nouns (person,
Object Oriented Analysis and Design System Events & Contracts.
Object Design Examples with GRASP (Ch. 18)
TK2023 Object-Oriented Software Engineering CHAPTER 5 DOMAIN MODELLING.
Domain Modelling Presented By Dr. Shazzad Hosain.
Sept Ron McFadyen1 Section 10.1 Domain Models Domain Model: a visual representation of conceptual classes or real-world objects in a domain.
DOMAIN MODE: ASSOCIATIONS, MULTIPLICITY AND ATTRIBUTE-TEXT NOTATION SYS466.
DOMAIN MODEL CLASS DIAGRAM Prepared by: Fatimah Alakeel November, 2011.
Review ♦ System sequence diagram ♦ Domain model
Lecture 9 Enterprise Systems Development ( CSC447 ) COMSATS Islamabad Muhammad Usman, Assistant Professor.
Jan 21, Ron McFadyen1 Ch 10. Domain Model: Visualizing Concepts Domain model illustrated with a class diagram (with no operations defined)
Conceptual Modeling Modeling the Problem Domain. Conceptual Modeling Decompose problem space into comprehensible concepts. Clarify the terminology or.
DOMAIN MODEL- VISUALIZING CONCEPTS Identify conceptual classes related to the current iteration requirements. Create an initial domain model. Distinguish.
Lecture 13-17, chitkara university.  Gives a conceptual framework of the things in the problem space  Helps you think – focus on semantics  Provides.
Chapter 9 Applying UML and Patterns -Craig Larman
Domain Model—Part 3: Associations, Multiplicity and Attribute- Text Notation.
SYS466: Analysis and Design Using OO Models Domain Class Diagram.
Conceptual Model or Domain Models Chapter10 Applying UML and pattern.
Chapter 1 Applying UML and Patterns. The Need for Software Blueprints Knowing an object-oriented language and having access to a library is necessary.
Elaboration Iteration 1- Part 1
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
Domain Model—Part 2: Attributes.  A logical data value of an object  (Text, p. 158)  In a domain model, attributes and their data types should be simple,
Repetition af Domæne model. Artifact influence emphasizing the Domain Model.
DOMAIN MODEL: ADDING ATTRIBUTES Identify attributes in a domain model. Distinguish between correct and incorrect attributes.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
Domain Model A representation of real-world conceptual classes in a problem domain. The core of object-oriented analysis They are NOT software objects.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
Larman chapter 101 Domain Model: Visualizing concepts Larman chapter 10.
OO Methodology Elaboration Phase Iteration 1- Part 3.
1 Chapter 9: Operation Contracts Chapter 13 in Applying UML and Patterns Book.
1 Object Oriented Analysis and Design Conceptual Model.
OO DomainModeling With UML Class Diagrams and CRC Cards Chapter 6 Princess Nourah bint Abdulrahman University College of Computer and Information Sciences.
BTS430 Systems Analysis and Design using UML Design Class Diagrams (ref=chapter 16 of Applying UML and Patterns)
1 Chapter 9: Conceptual Model Chapter 10, 11 & 12 in Applying UML and Patterns Book.
DOMAIN MODEL—PART 2: ATTRIBUTES BTS430 Systems Analysis and Design using UML.
1 Object Oriented Analysis and Design System Events & Contracts.
Elaboration popo.
Chapter 9 Domain Models.
Domain Model: Visualizing concepts
Conceptual Model.
Domain Models Part 1
DESIGN MODEL: USE-CASE REALIZATIONS WITH GRASP PATTERNS
OO Domain Modeling With UML Class Diagrams and CRC Cards
OO Domain Modeling With UML Class Diagrams and CRC Cards
Group Members Muhammad Zeeshan ( 16) Adnan Akhtar (4)
Object Oriented Analysis and Design Conceptual Model.
CONTENTS Object-Oriented Modeling Using UML
Object Oriented Analysis
Domain Model: Visualizing Concepts
Design Model: Creating Design Class Diagrams
Presentation transcript:

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 A domain model is a visual representation of conceptual classes or real-situation objects in a domain . Domain models have also been called conceptual models

Domain Objects Are Not Software Objects The term “Domain Model” means a representation of real-situation conceptual classes, not of software objects.

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 Based on the defined structure, we can describe the state of the problem domain at any time.

Simple domain model Attribute Association Role Domain class

EXAMPLE: Partial Domain model use cases sys. sequence diagrams domain models operation contract 5

Features of a domain model The following features enable us to express time invariant static business rules for a domain:- Domain classes – each domain class denotes a type of object.   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.   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. 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:- Business objects - represent things that are manipulated in the business e.g. Order. Real world objects – things that the business keeps track of e.g. Contact, Site. 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: 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. Add any additional static rules as UML notes that cannot be conveyed with UML symbols. Group diagrams/domain classes by category into packages. Concentrate more on just identifying domain classes in early iterations !

Identifying domain classes? Three ways in which you can indentify a domain class. Reuse or modify existing models. Use category list. 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 nouns as candidates for domain objects

Candidate Conceptual Classes: Process Sale, Iteration 1

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

Attributes vs. Classes Should “something” be Examples: Guideline: an attribute of a class, or a separate conceptual class Examples: Store: An attribute of Sale or separate class Store: Not a number or text Should be separate conceptual class Flight destination: An attribute or a separate class Destination is an airport, not a number Guideline: If we thing of something as simply a number or text in real life, it should be an attribute. Otherwise it should be a conceptual class.

UML: Associations 17

How to name an association? Pattern: Class name – verb phrase – class name Readable and meaningful Try to avoid “has” or “uses”. These give no extra information

UML: Multiplicity 19

Example

Domain Model- POS Example: From the Conceptual Class Category List and noun phrase analysis, a list is generated of candidate conceptual classes for the domain. Register Product Specification Store Cashier Customer SalesLineItem Manager ProductCatalog Item Payment Sale

Apply the following steps to create a domain model 1. List the candidate conceptual classes using the Conceptual Class Category List and noun phrase identification techniques related to the current requirements under consideration. 2. Draw them in a domain model. 3. Add the associations necessary to record relationships . 4. Add the attributes necessary to fulfill the information requirements.

Initial Domain Model

Domain Model: Adding Associations An association is a relationship between types (or more specifically, instances of those types) that indicates some meaningful and interesting connection

Association Guidelines Focus on those associations for which knowledge of the relationship needs to be preserved for some duration ("need-to-know" associations). It is more important to identify conceptual classes than to identify association Too many associations tend to confuse a domain model rather than illuminate it. Their discovery can be time-consuming, with marginal benefit. Avoid showing redundant or derivable associations. Name an association based on a TypeName-VerbPhrase-TypeName format where the verb phrase creates a sequence that is readable and meaningful in the model context.

Roles Each end of an association is called a role. Roles may optionally have: name multiplicity expression navigability

POS Domain Model Associations

Domain Model: Adding Attributes An attribute is a logical data value of an object. No Attributes as Foreign Keys Attributes should not be used to relate conceptual classes in the domain model

Example

Attributes in the POS Domain Model Payment amount— To determine if sufficient payment was provided, and to calculate change, an amount (also known as "amount tendered") must be captured. Product-Specification description— To show the description on a display or receipt. id— To look up a ProductSpecification, given an entered itemID, it is necessary to relate them to a id. price— To calculate the sales total, and show the line item price. Sale date, time— A receipt is a paper report of a sale. It normally shows date and time of sale. SalesLineItem quantity— To record the quantity entered, when there is more than one item in a line item sale (for example, five packages of tofu). Store address, name— The receipt requires the name and address of the store.

Domain Model Conclusion

References “Business Modelling with UML” – Penker “Analysis patterns” – Fowler Applying UML and Patterns – Craig Larman These books provide patterns for domain models.