上游充通大¥ SHANGHAI JIAO TONG UNIVERSITY Object identification is an ancient problem © Objects are not just found by taking a picture of a scene or domain The application domain has to be analyzed. Depending on the purpose of the system different objects might be found How can we identify the purpose of a system? Scenarios and use cases Another important problem:Define system boundary. What object is inside,what object is outside? Software Engineering
Software Engineering Object identification is an ancient problem Objects are not just found by taking a picture of a scene or domain The application domain has to be analyzed. Depending on the purpose of the system different objects might be found • How can we identify the purpose of a system? • Scenarios and use cases Another important problem: Define system boundary. • What object is inside, what object is outside?
上游充通大学 3.1.2 Pieces of an Object Model SHANGHAI JIAO TONG UNIVERSITY Classes Associations (Relations) Generic associations ·Canonical(规范)associations Part of-Hierarchy (Aggregation) Kind of-Hierarchy (Generalization) Attributes Detection of attributes Application specific Attributes in one system can be classes in another system Turning attributes to classes Operations Detection of operations Generic operations:Get/Set,General world knowledge,design patterns Domain[-specific]operations:Dynamic model,Functional model Software Engineering
Software Engineering 3.1.2 Pieces of an Object Model Classes Associations (Relations) • Generic associations • Canonical(规范) associations • Part of- Hierarchy (Aggregation) • Kind of-Hierarchy (Generalization) Attributes • Detection of attributes • Application specific • Attributes in one system can be classes in another system • Turning attributes to classes Operations • Detection of operations • Generic operations: Get/Set, General world knowledge, design patterns • Domain[-specific] operations: Dynamic model, Functional model
上游充通大¥ SHANGHAI JIAO TONG UNIVERSITY 3.1.3 Object Types Entity Objects Represent the persistent information tracked by the system (Application domain objects,"Business objects") Boundary Objects Represent the interaction between the user and the system Control Objects: Represent the control tasks performed by the system © Object types originated in Smalltalk: Model,View,Controller (MVC) Software Engineering
Software Engineering 3.1.3 Object Types Entity Objects • Represent the persistent information tracked by the system (Application domain objects, “Business objects”) Boundary Objects • Represent the interaction between the user and the system Control Objects: • Represent the control tasks performed by the system Object types originated in Smalltalk: • Model, View, Controller (MVC)
上游充通大¥ SHANGHAI JIAO TONG UNIVERSITY Having three types of objects leads to models that are more resilient to change. What types of objects are more resilient to change? Both interface and control of the system are more likely to change than the application domain /modell Paradox:The static information model from analysis is more stable,yet the designed representation is most likely to change [implementation] David Parnas invented the Information Hiding Principle and recommended encapsulation of data structures for this reason. [References:D.L.Parnas:On the Criteria for Decomposing Programs into modules'and "TBD CACM 5/72 and 12/72] Software Engineering
Software Engineering Having three types of objects leads to models that are more resilient to change. What types of objects are more resilient to change? • Both interface and control of the system are more likely to change than the application domain [model] • Paradox: The static information model from analysis is more stable, yet the designed representation is most likely to change [implementation] • David Parnas invented the Information Hiding Principle and recommended encapsulation of data structures for this reason. [References: D.L.Parnas: ‘On the Criteria for Decomposing Programs into modules’ and “TBD” CACM 5/72 and 12/72]
上游充通大 3.1.4 How do you find objects? SHANGHAI JIAO TONG UNIVERSITY Finding objects is the central piece in object modeling Learn about problem domain:Observe your client Apply general world knowledge and intuition Take the flow of events and find participating objects in use cases Try to establish a taxonomy [inheritance discovery] Apply design knowledge: Distinguish different types of objects [recognition/ discrimination] Apply design patterns (Lecture on design patterns-Chapter 8) Do a syntactic analysis of problem statement,scenario or flow of events Abbott Textual Analysis,1983,also called noun-verb analysis Nouns are good candidates for classes Verbs are good candidates for operations Software Engineering
Software Engineering 3.1.4 How do you find objects? Finding objects is the central piece in object modeling • Learn about problem domain: Observe your client • Apply general world knowledge and intuition • Take the flow of events and find participating objects in use cases • Try to establish a taxonomy [inheritance discovery] • Apply design knowledge: • Distinguish different types of objects [recognition/ discrimination] • Apply design patterns (Lecture on design patterns – Chapter 8 ) • Do a syntactic analysis of problem statement, scenario or flow of events • Abbott Textual Analysis, 1983, also called noun-verb analysis • Nouns are good candidates for classes • Verbs are good candidates for operations