C5: Domain Modeling Flashcards
Domain Modelling
A conceptualization process that aims to identify important domain concepts, their properties, and relationships between the concepts. The result is portrayed in a diagram called a domain model.
Extensional definition
Defines a concept by enumerating instances of the concept.
Intentional definition
Defines a concept through specification of properties and behaviours that instances of the concepts possess.
UML class diagram
A structural diagram that depicts the classes and their attributes and relationships between the classes.
A class
A type, an intentional definition of a concept. A class encapsulates its attributes and operations that characterize the instances of the class. An object is an instance of a class.
Why Domain Modeling?
● Domain modelling helps development team for the analyst understand the application and the application domain.
● Domain modelling lets the team members communicate and improve the common perception of application and application domain.
● Domain modelling helps a development team communicate their perception to the consumer or users and seek feedback.
● Domain modelling provides a common conceptual basis for the subsequent design, implementation testing and maintenance.
● A domain model can help new team members understand the relevant application and application domain.
Association
A relation between one or more classes. It states that objects of one class may relate to objects of other classes.
Multiplicity and Role
Multiplicity of a class with respect to an association is an assertion on the number of instances of the class that may relate to each combination of one instance of each of the other classes in the association.
Aggregation
A binary relation between two classes. It states that objects of one class is apart of another object class.
Inheritance
A binary relation between two concepts or classes such that one concept of class is a generalization or specialisation of the other.
Polymorphism
Means that one thing can assume different forms.
Association Class
A special class that defines properties and behaviours for the instances of an association.
Steps for Domain Modeling
- Collecting application domain information
- Brainstorm
- Focus on domain specific or domain relevant concepts and relationships.
- Ignore design and implementation concepts.
- Classifying brainstorming results
- Visualising the domain model
- Domain Model and class diagram - A domain model is visualised buy a class diagram in which the classes do not show any operations.
- Using aggregation
- Using inheritance - Use Inheritance only if instance of a subclass is also instance of a superclass. Use Inheritance only if all relationships of the superclass are also relationships of the subclass.
- Reviewing the domain model
Guidelines for domain Modeling
- The team members should perform brainstorming and classification as team activities rather than individual activities.
- Brainstorm first then classify.
- Each brainstorming in classification session should last 1 to 2 hours.
- Each brainstorming and classification session should be effectively coordinated.
- Do not draw UML class diagrams during brainstorming and classification sessions.
Apply Agile Principles to Domain Modeling
- Work closely with the customers and users to understand the application and application domain.
- Perform domain modelling only if the team needs to understand the application domain keep the domain model simple and expanded incrementally.
- Domain modeling may be performed simultaneously with actor-system interaction modeling, object interaction modeling, object state modeling, and/or activity modeling.