1 / 31

Domain Model

Domain Model. What is a Domain Model?. A 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 . Why do a domain model?.

kaitlyn
Télécharger la présentation

Domain Model

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Domain Model lecture 13-17, chitkara university

  2. What is a Domain Model? A 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. lecture 13-17, chitkara university

  3. 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. lecture 13-17, chitkara university

  4. Simple domain model lecture 13-17, chitkara university

  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. lecture 13-17, chitkara university

  6. 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 ! lecture 13-17, chitkara university

  7. How to Find Conceptual Classes? Three Strategies to Find Conceptual Classes? • Reuse or modify existing models. • Use a category list. • Identify noun phrases. lecture 13-17, chitkara university

  8. Method 2: Use a Category List We can create a domain model by making a list of candidate conceptual classes which contains many common categories with an emphasis on business information system needs. lecture 13-17, chitkara university

  9. Use a category list Cont…. Case Study: Airline Reservation Domain lecture 13-17, chitkara university

  10. Method 3: Finding Conceptual Classes with Noun Phrase Identification Another useful technique (because of its simplicity) suggested is linguistic analysis: Identify the nouns and noun phrases in textual descriptions of a domain, and consider them as candidate conceptual classes or attributes. lecture 13-17, chitkara university

  11. Identify noun phrases Case Study: POS Domain 1. Customer arrives at a POS checkout with goods and/or services to purchase. 2. Cashier starts a new sale. 3. Cashier enters item identifier. 4. System records sale line item and presents item description, price, and running total. Price calculated from a set of price rules. lecture 13-17, chitkara university

  12. What are Conceptual Classes? The domain model illustrates conceptual classes or vocabulary in the domain. Informally, a conceptual class is an idea, thing, or object. More formally, a conceptual class may be considered in terms of its symbol, intension, and extension • Symbol words or images representing a conceptual class. • Intension the definition of a conceptual class. • Extension the set of examples to which the conceptual class applies. lecture 13-17, chitkara university

  13. A conceptual class has a symbol, intension, and extension lecture 13-17, chitkara university

  14. Example: Find and Draw Conceptual Classes • Case Study: POS Domain • From the category list and noun phrase analysis, a list is generated of candidate conceptual classes for the domain. On the basis of category list guidelines that emphasize business transactions and their relationship with other things. The list is constrained to the requirements which is under consideration for scenario of Process of Sale. lecture 13-17, chitkara university

  15. Example: Find and Draw Conceptual Classes Case Study:POS Domain • Sale • Cashier • CashPayment • Customer • SalesLineItem • Store • Item • ProductDescription • Register • ProductCatalog • Ledger lecture 13-17, chitkara university

  16. Initial POS domain model lecture 13-17, chitkara university

  17. How to Model the Unreal World? • Some software systems are for domains that find very little analogy in natural or business domains; • software for telecommunications is an example. • It is still possible to create a domain model in these domains, but it requires a high degree of abstraction and stepping back from familiar designs. • For example, here are some candidate conceptual classes related to a telecommunication switch: • Message, Connection, Port, Dialog, Route, Protocol. lecture 13-17, chitkara university

  18. A Common Mistake with Attributes vs. Classes The most common mistake when creating a domain model is to represent something as an attribute when it should have been a conceptual class. • Guideline If we do not think of some conceptual class X as a number or text in the real world, X is probably a conceptual class, not an attribute. lecture 13-17, chitkara university

  19. A Common Mistake with Attributes vs. Classes cont. with example In the real world, a store is not considered a number or text the term suggests a legal entity, an organization, and something that occupies space. Therefore, Store should be a conceptual class. As another example, consider the domain of airline reservations. Should destination be an attribute of Flight, or a separate conceptual class Airport? In the real world, a destination airport is not considered a number or text it is a massive thing that occupies space. Therefore, Airport should be a concept. lecture 13-17, chitkara university

  20. Model with 'Description' Classes A description class contains information that describes something else. For example, a ProductDescription that records the price, picture, and text description of an Item. lecture 13-17, chitkara university

  21. Why Use 'Description' Classes? • An Item instance represents a physical item in a store; as such, it may even have a serial number. • An Item has a description, price, and itemID, which are not recorded anywhere else. • Everyone working in the store has amnesia. • Every time a real physical item is sold, a corresponding software instance of Item is deleted from "software land." lecture 13-17, chitkara university

  22. Descriptions about other things The * means a multiplicity of "many." It indicates that one Product Description may describe many (*) Items. lecture 13-17, chitkara university

  23. Descriptions in the Airline Domain lecture 13-17, chitkara university

  24. How to Create a Domain Model? Bounded by the current iteration requirements under design: • Find the conceptual classes (see a following guideline). • Draw them as classes in a UML class diagram. • Add associations and attributes. lecture 13-17, chitkara university

  25. Attributes An attribute is a logical data value of an object. It is useful to identify those attributes of conceptual classes that are needed to satisfy the information requirements of the current scenarios under development. lecture 13-17, chitkara university

  26. 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! lecture 13-17, chitkara university

  27. Associations • An association is a relationship between classes (more precisely, instances of those classes) that indicates some meaningful and interesting connection. lecture 13-17, chitkara university

  28. The UML notation for associations lecture 13-17, chitkara university

  29. Applying UML: Attribute Notation lecture 13-17, chitkara university

  30. Multiplicity • Multiplicity defines how many instances of a class A can be associated with one instance of a class B. Multiplicity on association lecture 13-17, chitkara university

  31. Multiplicity values lecture 13-17, chitkara university

More Related