Object-Oriented Analysis & Design

Slides:



Advertisements
Similar presentations
Fall 2002 SJSU -- CmpE Enterprise & Application Frameworks Dr. M.E. Fayad, Professor Computer Engineering Department – RM# College of Engineering San José.
Advertisements

L3-1-S1 OO Concepts © M.E. Fayad SJSU -- CMPE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room.
 Fayad SJSU -- CmpE Software Engineering Management Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
L4-1-S1 UML Overview © M.E. Fayad SJSU -- CmpE Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
SJSU – CmpE Fall 2002 Enterprise & Application Frameworks Dr. M.E. Fayad, Professor Computer Engineering Department – RM# College of Engineering San José.
L3-5c-S1 Object Diagrams © M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department,
L16-S1 Object Diagrams 2003 SJSU -- CmpE Software Patterns Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
L5-S1 Software StabilitySJSU – CmpE © M.E. Fayad Software Architectures Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
L19-S1 More on Class Diagrams 2003 SJSU -- CmpE Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
 Fayad SJSU – CmpE Software Engineering Management Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
May-June 2001 ISISTAN Research Institute – Tandil, Argentina Software Design Methodologies: UML in Action Dr. Mohamed Fayad, J.D. Edwards Professor Department.
L21-S1 Model-Based Arch SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
L3-5d-S1 Class Diagrams © M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room.
© M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
May-June 2001 ISISTAN Research Institute – Tandil, Argentina Software Design Methodologies: UML in Action Dr. Mohamed Fayad, J.D. Edwards Professor Department.
© M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
© M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
© M.E. Fayad SJSU -- CmpE Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San José.
CS350/550 Software Engineering Lecture 1. Class Work The main part of the class is a practical software engineering project, in teams of 3-5 people There.
May-June 2001 ISISTAN Research Institute – Tandil, Argentina Software Design Methodologies: UML in Action Dr. Mohamed Fayad, J.D. Edwards Professor Department.
L5-S1 Class Diagrams 2003 SJSU -- CmpE Software Patterns Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San.
L8-S1 CRC Cards 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
© M.E. Fayad SJSU -- CmpE Analysis Heuristics Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San.
© M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
 Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San.
© M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
L04-S1 Stable Design Patterns 2003 SJSU -- CmpE Software Patterns Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
L6-1-S1Design Heuristics - 1 © M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department,
Introduction To System Analysis and design
L2-S1Modeling 2003 SJSU -- CMPE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
L1-S1Introduction 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
Chapter 8 Object Design Reuse and Patterns. Object Design Object design is the process of adding details to the requirements analysis and making implementation.
L4-S1 Modeling Concepts 2003 SJSU -- CMPE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
L6-S1 UML Overview 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College.
1/3/2016  1998-Present Fayad KSU – SWE Process and Modeling Software Process and Modeling Dr. M.E. Fayad, Professor Software Engineering Department, Room.
Fall 2002 SJSU -- CMPE Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department – RM# College of Engineering San José.
Software Reuse Course: # The Johns-Hopkins University Montgomery County Campus Fall 2004 Session 5 Lecture # 4 – October 5, 2004.
Banaras Hindu University. A Course on Software Reuse by Design Patterns and Frameworks.
L11-S1TOP 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of.
L3-S1Analysis Heuristics 2003 SJSU -- CmpE Advanced Object-Oriented Analysis & Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I.
L1-S1 Infinite R-DB 2003 SJSU -- CmpE Database Design Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San.
SJSU – CmpE © M.E. Fayad Software Engineering Management Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering.
Elaboration: Iteration 2. Elaboration: Iteration 2 Basics Iteration 1 ends with : All the software has been tested: The idea in the UP is to do early,
GRASP – Designing Objects with Responsibilities
CompSci 280 S Introduction to Software Development
Software Engineering Lecture 4 System Modeling The Analysis Stage.
Object-Oriented Analysis & Design
Advanced Object-Oriented Analysis & Design
Software Engineering Management
Software Patterns Dr. M.E. Fayad, Professor
Component-Based & Software Reuse
Software System Engineering
Object-Oriented Analysis & Design
Model-View-Controller Patterns and Frameworks
Software Engineering Management
Advanced Object-Oriented Analysis & Design
Patterns.
Software System Engineering
Algorithms and Problem Solving
Software System Engineering
Advanced Object-Oriented Analysis & Design
Chapter 5 Architectural Design.
Object-Oriented Analysis & Design
Database Design Dr. M.E. Fayad, Professor
Advanced Object-Oriented Analysis & Design
Advanced Object-Oriented Analysis & Design
Component Based & Software Reuse
Software Systems Engineering
Advanced Object-Oriented Analysis & Design
Presentation transcript:

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

Lesson 3: Analysis Heuristics 2 2003 SJSU – CmpE --- M.E. Fayad

3 Lesson Objectives Overview of previous lectures. Understand the analysis heuristics 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” 3 2003 SJSU – CmpE --- M.E. Fayad

4 Overview: Life Cycle What is the customer really wants? RA Design Code Test Deploy What How Build Test Use What is the customer really wants? How – the best solution How do we construct (implement) the system Test - Are customer requirements testable? - Does the how logically follow from what? - Does the built system do what it is suppose to do? How do we enhance &/or repair the built system? 4 2003 SJSU – CmpE --- M.E. Fayad

Overview: Analysis vs. Design Analysis Design What is the problem? How to solve the problem? Problem Space Solution Space Mostly “one” Problem Many Solutions 5 2003 SJSU – CmpE --- M.E. Fayad

Overview: Process Properties Practical Concrete Action Can be measured Repeatable Tailorable Must be documented Hierarchical Specify who, what, when, how and ignore the why? 6 2003 SJSU – CmpE --- M.E. Fayad

Overview: Model Properties Simple Complete (most likely to be correct) Stable to technological changes Testable Easy to understand Visual or graphical 7 2003 SJSU – CmpE --- M.E. Fayad

Heuristic #1: Go Beyond the Problem Domain A system structure is based on the “Real World”, “locks in” today’s problem domain relationships. This makes it difficult to adapt the system to future requirements. Look for relationships and generalizations that transcend the current problem domain Ask “What is it?” 8 2003 SJSU – CmpE --- M.E. Fayad

Heuristic #1: Go Beyond the Problem Domain Build these into the analysis model Developing an adaptable architecture does not happen just because you are using OOD and/or C++ (any more than extensibility or reuse occur automatically) Generalize Early & Generalize Vigorously 9 2003 SJSU – CmpE --- M.E. Fayad

Heuristic #2: Speculate About Likely Changes The “Real World” is the best model of today but it only hints at what tomorrow will bring Basic for speculation Changing user requirements Changing customer base Competitive products changing technology 10 2003 SJSU – CmpE --- M.E. Fayad

Heuristic #2: Speculate About Likely Changes Build the analysis model so it can adapt to these likely changes You do not have to be 100% correct. Developing an adaptable architecture does not happen just because you are using OOD and/or C++ (any more than extensibility or reuse occur automatically) – Exs: Hooks, HotSpots, Design Patterns 11 2003 SJSU – CmpE --- M.E. Fayad

Heuristic #3: Separate General Functionality from Specific Policy Place general functionality in entity objects (class) Entity object (class) will now be more reusable. Place specific policy in control objects (active class) Policy is localized so that it is easier to introduce changes to this policy 12 2003 SJSU – CmpE --- M.E. Fayad

Heuristic #3: Separate General Functionality from Specific Policy Conservation of Policy There is no way to eliminate or ignore all policy The policy will be in the delivered system All we can do is structure the policy so that it is easy to adapt and change it. Mechanism Rich & Policy Free 13 2003 SJSU – CmpE --- M.E. Fayad

Heuristic #3: Illustrated Example – The Problem Calculator State Tax File System Federal Tax 14 Forms 2003 SJSU – CmpE --- M.E. Fayad

Heuristic #3: Illustrated Example – The Solution State Tax MRPR Federal Tax MRPR Forms MRP+ Calculator MRPF 15 File System MRPF 2003 SJSU – CmpE --- M.E. Fayad

Heuristic #4: Objects Should Have Cohesive Interfaces In the “Real World”, a remote Controller for home electronics may have 50 buttons for controlling your TV, VCR, Stereo , and others. Modeling this controller as a single, real-life object will not be adaptable to future changes. 16 2003 SJSU – CmpE --- M.E. Fayad

Heuristic #4: Objects Should Have Cohesive Interfaces It may be better to: First model each different set of operations as a separate object with a strongly cohesive interface. Model the combined functionality as a separate object that uses other objects. Result is more adaptable and reusable Do One Thing 17 2003 SJSU – CmpE --- M.E. Fayad

Heuristic #5: Objects Should Intelligent Agents Intelligent (Responsible) Objects Incorporate important knowledge Incorporate knowledge that is difficult to produce, find, or replicate Know how to synthesize knowledge 18 2003 SJSU – CmpE --- M.E. Fayad

Heuristic #5: Objects Should Intelligent Agents Agents are capable of (limited) autonomous behavior Know that they are supposed to do, and they do. Work best with limited supervision. Adapt to their environment Know how to delegate work to other objects 19 2003 SJSU – CmpE --- M.E. Fayad

Heuristic #5: Objects Should Intelligent Agents Agents are capable of (limited) autonomous behavior Know how to find objects to which they can delegate work Have the information they need or know where to get the information or know where to get information on getting information or can interpret information given to them. Are highly adaptable, extensible, and reusable Are expensive to design and build 20 2003 SJSU – CmpE --- M.E. Fayad

Heuristic #6: Objects Should Export Services Objects that only export attributes or data must be manipulated by clients. (aka. “dead data”) Objects that only export basic operations require clients to direct and supervise all activity (aka. “stupid objects”) Objects that export services make life easier for their clients: Server selects the best way to perform the service Server finds and manages the resources 21 2003 SJSU – CmpE --- M.E. Fayad

Heuristic #6: Objects Should Export Services Services should define “What” not “How” Can “Drive to Work” be replaced by “Get to Work” Enhances extensibility Enhances reusability Distributes intelligence 22 Move Complexity From the Clients to the Servers 2003 SJSU – CmpE --- M.E. Fayad

Heuristic #6: Stack Example Stack Implementations Type Stack push ( ) DLL pop ( ) SLL length ( ) Stack Interfaces ARY empty ( ) HT full ( ) 23 2003 SJSU – CmpE --- M.E. Fayad

Heuristic #7: Avoid “Object Machismo” Equating the value of an object with how big and/or complex it is (e.g., Lines of Code, # of methods, or complexity of algorithms it uses). Macho objects tend to be central controllers that are difficult to design, difficult to understand, have to much policy, are hard to extend, and low reuse potential. 24 2003 SJSU – CmpE --- M.E. Fayad

Heuristic #7: Avoid “Object Machismo” The value of an object is based on many factors Does it do something useful Does it have a simple and clean interface Does it have well-specific behavior Does it model an essential quality of the system Can it be composed with other objects to perform more complex tasks. 25 2003 SJSU – CmpE --- M.E. Fayad

Heuristic #7: Avoid “Object Machismo” The value of an object is also based on other objects: An object perfectly suited for one model may be totally wrong in another model The object must be placed in context to see whether or not it is a good and valuable object. A Valuable Object Works and Plays Well with Others. 26 2003 SJSU – CmpE --- M.E. Fayad

27 Discussion Questions Explain the following statements: 1. Objects should be intelligent agents 2. Mechanism rich and policy free 3. A valuable object works and plays well with others 4. Analysis model should not be too elaborate or too formal Explain how to build an analysis model Explain how do you make the analysis model more adaptable Essay Topic: Analysis Guidelines 27 2003 SJSU – CmpE --- M.E. Fayad

Questions for the Next Lecture Modeling Concepts, such as Concepts Roles Actors Systems Logical forms Structures Abstraction 28 2003 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. E-mail me if you like to start right away. Please note that problem statements must be submitted electronically as MS Word format. 29 2003 SJSU – CmpE --- M.E. Fayad