Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San José State University One Washington Square San José, CA 95192-0180 http://www.engr.sjsu.edu/~fayad 2003 SJSU -- CMPE
SJSU – CMPE ---- M.E. Fayad Lesson 2: Modeling 2 2003 SJSU – CMPE ---- M.E. Fayad
SJSU – CMPE ---- M.E. Fayad Lesson Objectives Understand modeling Why we model? Discuss model essentials Explore different models Understand the differences between a method and a process between multiple models and multiple views 3 2003 SJSU – CMPE ---- M.E. Fayad
SJSU – CMPE ---- M.E. Fayad Definitions Define: Standards Methodologies Method & Process Model & View Tools Environments 4 2003 SJSU – CMPE ---- M.E. Fayad
SJSU – CMPE ---- M.E. Fayad Standards Standards imply regulations, guidelines, rules, laws, and so on. Standards can dictate named methodologies, such as IEEE standards or DOD standards (Ex: DOD-STD-2167A). A standard alone is not sufficient on getting a task completed. Why? 5 [Fayad-Laitinen 1998] 2003 SJSU – CMPE ---- M.E. Fayad
SJSU – CMPE ---- M.E. Fayad Standards Because standards focus on the attributes of the results instead of how the results will be achieved A standard also includes a type, model, or example commonly or generally accepted or adhered to, such a criterion set for usage or practices (moral standards) Standards applies to some measure, principle, model, and so on, with which things of the same class are compared to determine their quantity, value, quality, and so forth (standards of purity in drugs) 6 [Fayad-Laitinen 1998] 2003 SJSU – CMPE ---- M.E. Fayad
SJSU – CMPE ---- M.E. Fayad Methodology A methodology is “a science of method or orderly arrangement” Webster. A methodology is used to refer to the very highest level of the way we do things. A methodology also refers to “a system of methods, as in particular science” The methodology we will consider here cover only the development of software applications. 7 [Fayad-Laitinen 1998] 2003 SJSU – CMPE ---- M.E. Fayad
SJSU – CMPE ---- M.E. Fayad Methods or Techniques A method implies a regular, orderly, logical procedure for doing something, such as a method of finding software requirements. Exs: Waterfall model, spiral model [Boehm84], and fountain model [Henderson-Selers90]. Jacobson defines a method as a planned procedure by which a specific goal is approached step by step [Jacobson92]. Examples of software design method are a set of work procedures, a set of notations, or a set of heuristics. 8 2003 SJSU – CMPE ---- M.E. Fayad
SJSU – CMPE ---- M.E. Fayad Methods or Techniques Software engineering methods can be divided into three major categories: 1. Process-Oriented Methods [Yourdon89] 2. Data-Oriented Methods [Martin90] 3. Object-Oriented Methods [Fayad93, Rumnaugh91, etc..] 9 2003 SJSU – CMPE ---- M.E. Fayad
SJSU – CMPE ---- M.E. Fayad POM vs. OOM 10 2003 SJSU – CMPE ---- M.E. Fayad
Method Provides Foundation for Software Engineering 11 2003 SJSU – CMPE ---- M.E. Fayad
The Myth of the Single Software Development Method 12 2003 SJSU – CMPE ---- M.E. Fayad
How Many OO Methods Exist? UML 13 2003 SJSU – CMPE ---- M.E. Fayad
Engineering Process Hierarchy Scientific Area Standards Methodologies (Macrodevelopment Processes) Techniques (Methods) (Minidevelopment Processes) Processes (Microdevelopment Processes Computer Electronics Hardware Software SASD OOT UML OMT 14 Identify Classes Identify Attributes 2003 SJSU – CMPE ---- M.E. Fayad
Processes are Important for a new OO Teams New methods and tools introduce confusion Processes define exactly who, what, when, and how “big-picture” 15 2003 SJSU – CMPE ---- M.E. Fayad
SJSU – CMPE ---- M.E. Fayad Method vs. Process Processes take OO methods out of the classroom and put them to work Theoretical Ideas Predictions Practical Concrete Actions Metrics 16 2003 SJSU – CMPE ---- M.E. Fayad
Defined Processes are Baseline for Improvements 17 Can’t improve anything that you can’t repeat 2003 SJSU – CMPE ---- M.E. Fayad
Software Process Hierarchy 18 2003 SJSU – CMPE ---- M.E. Fayad
General Processes Must be Tailored to Your Projects 19 2003 SJSU – CMPE ---- M.E. Fayad
Identifying Appropriate Process Details Too Much not cost effective typically too much “why” Cost effective range depends upon environment specifies “who”, “what”, “when” reference “how” Not Enough useless typically only “what” 20 2003 SJSU – CMPE ---- M.E. Fayad
SJSU – CMPE ---- M.E. Fayad Modeling Model building is a well established human tradition, e.g. Ancient Egyptian built models for their pyramids and temples Early ship builders produced physical models for the British Admiralty Building plans Electronic schematics Physics 21 2003 SJSU – CMPE ---- M.E. Fayad
Any single thing can be represented by a large number of models Modeling – Definition Building a model is a well-established human process. A model is a description of something. Models allow us to answer questions about a real thing before we build it. Models capture only those features deemed essential by model builders for their goals. A single thing might be represented by multiple model. Models can be validated. 22 Any single thing can be represented by a large number of models 2003 SJSU – CMPE ---- M.E. Fayad
Objectives of Modeling To communicate the desired structure and behavior of the system To visualize the system’s architecture To better understand the system we are building To serve as a template that guide us in constructing a system To expose opportunities for simplification and reuse To document the decisions made To manage risk 23 2003 SJSU – CMPE ---- M.E. Fayad
SJSU – CMPE ---- M.E. Fayad Modeling and Model Modeling A central part of all the activities that lead up to the deployment of good software. Model A simplification of reality Provides the blueprint of a system 24 2003 SJSU – CMPE ---- M.E. Fayad
Principles of Modeling The best models are connected to reality No single model is sufficient. Every nontrivial system is best approached through a small set of nearly independent models 25 2003 SJSU – CMPE ---- M.E. Fayad
SJSU – CMPE ---- M.E. Fayad Model Essentials Simple Complete (most likely to be correct) Stable to technological changes Testable Easy to understand Visual or graphical 26 [Fayad98] 2003 SJSU – CMPE ---- M.E. Fayad
Modeling in this Course In this course, we will focus on the job of modelers: How they collect facts/requirements about the application domain from different sources How they prepare models of the application domain How they limit their modeling activities How they create one or more models of the target system How they use models to create blueprints and architect software How they test and validate their models 27 2003 SJSU – CMPE ---- M.E. Fayad
Summary: Models Serve Several Purposes Testing a physical entity before building it Communication with customers Visualization Reduction of complexity 27 2003 SJSU – CMPE ---- M.E. Fayad
Modeling Classifications [1] Tangible Physical Examples Mall Aircraft Intangible Logical Examples Flowcharts STDs DFDs 29 2003 SJSU – CMPE ---- M.E. Fayad
Modeling Classifications [2] Static Object models Domain models DFDs Dynamic Behavior models Flowcharts Petri-Net Three properties: Control, Behavior, Time 30 2003 SJSU – CMPE ---- M.E. Fayad
Modeling Classifications [3] Object Model (class diagram) Control Model (STDs, FlowCharts, Activity Diagrams, OIDs) Transformation Model (DFDs) 31 2003 SJSU – CMPE ---- M.E. Fayad
Modeling Classifications [4]: UML Static Type diagrams, CRC cards, use case Model, use case diagrams, and class diagrams Dynamic or Behavior Activity diagrams, collaboration diagram, sequence diagram, and state diagram Implementation Component diagram & deployment diagram 32 2003 SJSU – CMPE ---- M.E. Fayad
Multiple Models vs. Multiple Views UML has 9 different models. This called “multiple models” and represents: Abstraction, what and how, etc. It is not “multiple views” Multiple view represents: Presentations Levels, layers, slices, details Scalability, accessibility, authorization, information hiding, dimensions 33 2003 SJSU – CMPE ---- M.E. Fayad
Tools: Select Tools to Meet Specific Needs 34 2003 SJSU – CMPE ---- M.E. Fayad
Discussion Questions (1) What are the differences between multiple models and multiple views? T/F UML stands for United Modeling Level. Use case diagrams are behavior models. Data flow diagrams are tangible models. Decision tables are control models. Petri nets are static models Software design is part of UML. What are the properties of software process? What are the essential properties of the model? 35 2003 SJSU – CMPE ---- M.E. Fayad
Discussion Questions (2) Define: Static models, dynamic models, transformation models What are the differences between a method and a process? What are the differences between tangible and intangible modeling? Identify examples of tangible modeling in system development Identify examples of intangible modeling in system development “System development is model building.” Please describe. “Models serve several purposes.” Please describe. Essay Topic 1: Multiple Models vs. Multiple Views Essay Topic 2: Mapping from models to views 36 2003 SJSU – CMPE ---- M.E. Fayad
Questions for the Next Lecture Discuss the following guidelines Go Beyond the Problem Domain Speculate About Likely Changes Separate General Functionality from Specific Policy Object should have Cohesive Interfaces Objects Should Be Intelligent Agents Objects Should Export Services Avoid “Object Machismo” 37 2003 SJSU – CMPE ---- M.E. Fayad
SJSU – CMPE ---- M.E. Fayad Tasks for Next Lecture Task 1: Problem Statement for team projects are needed (see sample problems on OOPSLA – DesignFest). This is due on the third week of the semester. Task 2: Identify the team members of your team. Select a team name and e-mail me, the team name, team’s members’ names, their e-mails, phone numbers -- Immediately. Task 3: Think about extra assignments and writing essays. E- mail me if you like to start right away. Please note that problem statements must be submitted electronically as MS Word format. 38 2003 SJSU – CMPE ---- M.E. Fayad