Presentation is loading. Please wait.

Presentation is loading. Please wait.

Repetition af Domæne model. Artifact influence emphasizing the Domain Model.

Similar presentations


Presentation on theme: "Repetition af Domæne model. Artifact influence emphasizing the Domain Model."— Presentation transcript:

1 Repetition af Domæne model

2 Artifact influence emphasizing the Domain Model

3 Domain Model The Domain Model is the most important artifact to create during object oriented analysis – (a visual dictionary) The domain model is a representation of real-world conceptual classes NOT of software components The domain model is used as a source of inspiration for designing software objects.

4 Domain Model

5 Domain Model guideline It is better to overspecify a domain model with lots of fine-grained conceptual classes than to underspecify it ! A Domain Model is not absolutely correct or wrong, but more or less useful, it is a tool of communication

6 Domain Model strategies to identify conceptual classes Use a conceptual class category list (p 134-135)  list of candidate conceptual classes Identify noun phrases  based upon fully dressed use cases (p 135-136) (Use analysis patterns)

7 Domain Model Candidate conceptual classes for the Sales Domain: Receipt??? –Report of a sale – duplicates information found elsewhere  exclude receipt –Special role in terms of business rules (the right to return bought items)  include it (since returns are not considered in this iteration, receipt is excluded)

8 Domain Model Modeling guidelines 1.List the candidate conceptual classes using CCC-List and noun phrase identification technique related to the current requirements under consideration 2.Draw them in a domain model 3.Add the associations necessary to record relationships for which there is a need to preserve some memory 4.Add the attributes necessary to fulfill the information requirements

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

10 Domain Model F inding associations Common Associations List (p 156-157) High-Priority Associations: –A is a physical part of B –A is physically or logically contained in B –A is recorded in B

11 Domain Model 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 associations Too many associations tend to confuse the domain model rather than illuminate it. Their discovery can be time-consuming, with marginal effect Avoid showing redundant or derivable associations

12 NextGen POS Domain Model Associations

13 Attributes Attribute = a logical data value of an object. Include the following attributes in a domain model : –Those for which the requirements (ex. Use cases) suggest or imply a need to remember information. –Ex. A receipt normally has a date and time.

14 Valid attribute types Keep it simple –Prefer simple attributes or data types Boolean, Date, Number, String…. Relate conceptual classes with an association –not with an attribute

15 A partial domain model

16 Modeling Generalization A conceptual superclass definition is more general or encompassing than a subclass definition Identify domain superclasses and subclasses relevant to the current investigation, and illustrate them in the Domain Modelc

17 Modeling Generalization class set membership “100%” rule

18 Modeling Generalization subclass conformance “Is-a” rule

19 When to define conceptual subclasses? Create a conceptual subclass of a superclass when: (see also page 402) –The subclass has additional attributes of interest –The subclass has additional associations of interest –The subclass concept is operated on, handled, reacted to or manipulated differently than the superclass or other subclasses, in ways that are of interest –The subclass concept represents an animate thing that behaves differently than the superclass or other subclasses, in ways that are of interest

20 When to define a conceptual superclass? Create a conceptual superclass in a generalization relationship to subclasses when: –The potential conceptual superclass represents variations of a similar concept –The subclasses will conform to the ”100%” and ”Is-a” rules –All subclasses have the same attribute which can be factored out and expressed in the superclass –All subclasses have the same association which can be factored out and related to the superclass

21 Abstract Conceptual Classes If all members of a class C must also be member of a subclass, the class C is called an abstract conceptual class

22 Association Classes Guidelines for adding association classes: –An attribute is related to an association –Instances of the association class have a life-time dependency on the association –There is a many-to-many association between two concepts, and information associated with the association itself

23 Association Classes examples

24 Aggregation and composition Aggregation is a kind of association used to model whole-part relationships between things. The whole is called the composite Two types: –Composite aggregation – (filled diamond) –Shared aggregation – (hollow diamond)

25 Aggregation and composition

26 How to identify aggregation: –If in doubt, leave it out Consider showing aggregation when: –The lifetime of the part is bound within the lifetime of the composite – there is a create-delete dependency of the part on the whole –There is an obvious whole-part physical or logical assembly –Some properties of the composite propagate to the parts, such as the location –Operations applied to the composite propagate to the parts, such as destruction, movement, recording

27 Aggregation and composition

28 Roles as concepts vs. roles in associations

29 Derived elements

30 Packages - POS Domain Model


Download ppt "Repetition af Domæne model. Artifact influence emphasizing the Domain Model."

Similar presentations


Ads by Google