SlideShare a Scribd company logo
itec315_lecture 9  about object oriented analysis and design
2
Object-Oriented Analysis and Design with the Unified Process
Objectives
 Explain how statecharts can be used to describe
system behaviors
 Use statecharts to model system behavior and
method logic
 Explain the importance of design patterns in object-
oriented design
 Briefly describe and use the singleton, adaptor, and
observer design patterns
3
Object-Oriented Analysis and Design with the Unified Process
Objectives (continued)
 Explain why enterprise-level systems require special
design consideration
 Apply UML deployment architectural notation to
Web-based systems
 Explain how Web services work to obtain
information on the Internet
4
Object-Oriented Analysis and Design with the Unified Process
Overview
 Model system and object behavior
 Statecharts
 Protect and stabilize systems
 Protection from variations and indirection
 Establish best practices in system construction
 Design patterns, or templates
 Design for enterprise-level and Web-based systems
 Distributed and networked environments
5
Object-Oriented Analysis and Design with the Unified Process
Modeling System Behavior and
Method Logic with Statecharts
 Statecharts were used in the requirements discipline
to capture status conditions of objects
 Statecharts are used in the design discipline to
 Define the behavioral constraints of the system
classes created during design
◘Windows menus, authentication and security classes,
error-handling classes
 Describe the method logic within class methods
◘Action-expressions contain information that help
define method logic
6
Object-Oriented Analysis and Design with the Unified Process
System-level Statecharts
 Designate the states and processing controls of a
system
 Which menu items are enabled or disabled
 Which windows are modal
 Which tool bars and icons are active
 Document possible options presented to users
 Use state variables to record the value of the
current state
7
Object-Oriented Analysis and Design with the Unified Process
Figure 9-1
Logon statechart for a computer system
8
Object-Oriented Analysis and Design with the Unified Process
Messages, Transitions, and
Methods
 A message causes a transition to fire
 A transition in a statechart is the execution of a
method
 A method signature is defined by the message to a
destination object
 Action expressions in a statechart define method
logic
 Describes the actions to be performed during a
transition
9
Object-Oriented Analysis and Design with the Unified Process
Figure 9-2
Comparison of methods, messages, and transitions
10
Object-Oriented Analysis and Design with the Unified Process
Action-expressions and Method
Logic
 A sequence diagram may not contain enough
internal details about a method
 Design statecharts extend requirements statecharts
 Action-expressions contain logic for later coding
 Transitions that allow the object to remain in the
same state
 Temporary states for inter-model consistency
 Decision pseudostates to indicate decision points on
a paths
11
Object-Oriented Analysis and Design with the Unified Process
Figure 9-4
Statechart for Order
12
Object-Oriented Analysis and Design with the Unified Process
Figure 9-5
Design statechart for Order
13
Object-Oriented Analysis and Design with the Unified Process
Design Principles-Protection From
Variations
 Parts of a system that are unlikely to change are
segregated from those that will
 Drives the multilayer design pattern
 Stable business logic can be protected from
variations in the user interface
 Changes in the business logic are isolated to the
controller class
14
Object-Oriented Analysis and Design with the Unified Process
Design Principles-Indirection
 Indirection is an implementation of the protection
from variations principle
 Decouples classes or other system components by
placing an intermediate classes between them
 Used in many corporate security systems between
an internal network and the Internet
 A proxy server catches all incoming messages and
redistributes them to the recipients
15
Object-Oriented Analysis and Design with the Unified Process
Importance of Design Patterns
 Standard design templates can speed OO design
 Patterns can exist at different levels of abstraction
 At the most concrete level, a class definition with
code
 At the most abstract level, an approach to a problem
 Patterns should contain five main elements
 Pattern name, problem, solution, example, benefits
and consequences
16
Object-Oriented Analysis and Design with the Unified Process
Figure 9-6
Pattern description
for the controller
pattern
17
Object-Oriented Analysis and Design with the Unified Process
Basic Design Patterns
 The authors of Elements of Reusable Object-
Oriented Software (referred to as the Gang of
Four) developed a basic classification scheme for
patterns (Figure 9-7)
 The 23 GoF patterns are some of the most
fundamental and important patterns in use
 Scores of other patterns have been defined
 For example, both Java and .NET have sets of
enterprise patterns
18
Object-Oriented Analysis and Design with the Unified Process
Figure 9-7
Classification of design patterns
19
Object-Oriented Analysis and Design with the Unified Process
Singleton Pattern
 For classes that must have only one instance, but
need to be invoked from several classes and
locations within the system
 The class itself controls the creation of only one
instance
 A static variable of the class refers to the object
that is created
 A class method instantiates the object on the first
call, and returns a reference to the object on
subsequent calls
20
Object-Oriented Analysis and Design with the Unified Process
Figure 9-8
Singleton pattern
template
21
Object-Oriented Analysis and Design with the Unified Process
Adaptor Pattern
 Plugs an external class into a system
 Converts the method calls from within the system to
match the method names in the external class
 A standard solution for protection from variations
 Insulates the system from frequently changing
classes
 An interface is frequently used to specify and
enforce the use of correct method names
22
Object-Oriented Analysis and Design with the Unified Process
Figure 9-10
Adapter pattern
template
23
Object-Oriented Analysis and Design with the Unified Process
Observer pattern
 Used to handle event-processing and reduce
coupling
 The domain class
 Allows other classes to “subscribe” as listeners
 “Publishes” the changes to the listeners
 The windows class
 Sends a reference of itself to subscribe as a listener
 Implements the method to be invoked when
notified
◘Inherits the method from the listener interface
24
Object-Oriented Analysis and Design with the Unified Process
Figure 9-11
Three classes in the Create new order use case
25
Object-Oriented Analysis and Design with the Unified Process
Figure 9-12
Implementation of the observer pattern
26
Object-Oriented Analysis and Design with the Unified Process
Figure 9-13
Observer pattern
template
27
Object-Oriented Analysis and Design with the Unified Process
Designing Enterprise-level
Systems
 Enterprise-level systems share components among
multiple people or groups in an organization
 Enterprise-level systems almost always use
multiple tiers of computers
 Can be client/server network-based or Internet
based
 Designed with deployment diagrams
 A type of implementation diagram that shows
physical components across different locations
28
Object-Oriented Analysis and Design with the Unified Process
Figure 9-14
Differences between client/server and Internet systems
29
Object-Oriented Analysis and Design with the Unified Process
UML Notation for Deployment
Diagrams
 Component
 Executable module or program
 Has an application program interface (API) that is
available to the outside world
 Node
 A physical entity at a specific location
 Frameset
 A high-level object that holds items to be displayed
by a browser
30
Object-Oriented Analysis and Design with the Unified Process
Figure 9-15
UML component
notation
31
Object-Oriented Analysis and Design with the Unified Process
Figure 9-16
UML node notation
Figure 9-17
UML extension for
frameset
32
Object-Oriented Analysis and Design with the Unified Process
Simple Internet Architecture
 Used for viewing static information
 The browser component executes on the client
computer
 The Internet server component executes on the
server computer
 Pages reside on the server and are sent to the
browser for display
 Program logic is inserted through scripting
languages, applets, or other controls
33
Object-Oriented Analysis and Design with the Unified Process
Figure 9-18
Simple Internet architecture
34
Object-Oriented Analysis and Design with the Unified Process
Two-layer Architecture
 Primarily captures information from the user and
updates the database
 The domain layer and data access layer are usually
combined
 Input data is sent to a CGI or an application server
 The user-interface classes often contain the
business logic and data access
 Processing takes place with servlets (Java) or code
behind classes (.NET)
35
Object-Oriented Analysis and Design with the Unified Process
Figure 9-19
Two-layer Internet
architecture
36
Object-Oriented Analysis and Design with the Unified Process
Three-layer Architecture
 Separates domain layer and data access layers
 Necessary for systems with complex business logic
or multiple user interfaces
 Using CGI
 Provide a use case controller for each form
 Using an application server
 Java tools: Java Server Pages and servlets
 .NET tools: Common Runtime Language and code
behind classes
37
Object-Oriented Analysis and Design with the Unified Process
Figure 9-20
Three-layer
Internet architecture
38
Object-Oriented Analysis and Design with the Unified Process
Web Services
 A program that provides a service via the Internet
 The service is posted in a directory so that systems
can find it
 Requests for information go to the UDDI directory
 UDDI provides the Internet address of a program
offering that service
 The application then requests the information
 All communication is based on XML to allow for
generic data exchange
39
Object-Oriented Analysis and Design with the Unified Process
Figure 9-21
Invoking a Web service
40
Object-Oriented Analysis and Design with the Unified Process
Summary
 Design statecharts
 Specify precise behavior and constraints of the
various portions of the final system
 Describe the method logic within an object
 Good design is based on two factors
 Good principles
 Standard design patterns
41
Object-Oriented Analysis and Design with the Unified Process
Summary (continued)
 Protection from variations
 Separates components that are likely to change
 Indirection
 Intermediate class provides an interface between
elements
 Design pattern examples
 Singleton
 Adaptor
 Observer

More Related Content

PPTX
Systems analysis and design in a changing world 5E.pptx
PPTX
Ch7-Software Engineering 9
PPT
Design engineering
PPT
Design engineering
PPTX
6- Architecture design complete (1).pptx
PPTX
OOSAD-Object Oriented Systems Analysis and Design - Chapter06-Part I.pptx
PPT
Object oriented sad-5 part i
PPTX
Systems analysis and design in a changing world 5E.pptx
Ch7-Software Engineering 9
Design engineering
Design engineering
6- Architecture design complete (1).pptx
OOSAD-Object Oriented Systems Analysis and Design - Chapter06-Part I.pptx
Object oriented sad-5 part i

Similar to itec315_lecture 9 about object oriented analysis and design (20)

PPTX
Software Engineering Architectural Design
PPTX
UNIT 3 SE.pptx
PPT
Design Concepts software engineering.ppt
PPTX
06 fse design
PPTX
Chapter Six: Design and impelementation.
PDF
SADP PPTs of all modules - Shanthi D.L.pdf
PPT
software engineering unit-3 in software engineering
PPTX
PDF
Systems Analysis and Design in a Changing World, Fourth Edition
PPT
Ch6.ppt
PPT
Moving to Design
PPT
Chapter1
PPT
PPT
3 analysis and design overview
PPT
CPIS351-chapter9.ppt contains about system analysis and design
PPT
PPTX
Architectural Design.pptx
PPTX
Ch6-Software Engineering 9
Software Engineering Architectural Design
UNIT 3 SE.pptx
Design Concepts software engineering.ppt
06 fse design
Chapter Six: Design and impelementation.
SADP PPTs of all modules - Shanthi D.L.pdf
software engineering unit-3 in software engineering
Systems Analysis and Design in a Changing World, Fourth Edition
Ch6.ppt
Moving to Design
Chapter1
3 analysis and design overview
CPIS351-chapter9.ppt contains about system analysis and design
Architectural Design.pptx
Ch6-Software Engineering 9
Ad

Recently uploaded (20)

PPTX
Pharma ospi slides which help in ospi learning
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Pre independence Education in Inndia.pdf
PDF
Insiders guide to clinical Medicine.pdf
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Institutional Correction lecture only . . .
PDF
Sports Quiz easy sports quiz sports quiz
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
Classroom Observation Tools for Teachers
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
RMMM.pdf make it easy to upload and study
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Pharma ospi slides which help in ospi learning
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Microbial diseases, their pathogenesis and prophylaxis
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
VCE English Exam - Section C Student Revision Booklet
Microbial disease of the cardiovascular and lymphatic systems
Pre independence Education in Inndia.pdf
Insiders guide to clinical Medicine.pdf
01-Introduction-to-Information-Management.pdf
Institutional Correction lecture only . . .
Sports Quiz easy sports quiz sports quiz
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Module 4: Burden of Disease Tutorial Slides S2 2025
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Renaissance Architecture: A Journey from Faith to Humanism
Classroom Observation Tools for Teachers
Abdominal Access Techniques with Prof. Dr. R K Mishra
RMMM.pdf make it easy to upload and study
TR - Agricultural Crops Production NC III.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Ad

itec315_lecture 9 about object oriented analysis and design

  • 2. 2 Object-Oriented Analysis and Design with the Unified Process Objectives  Explain how statecharts can be used to describe system behaviors  Use statecharts to model system behavior and method logic  Explain the importance of design patterns in object- oriented design  Briefly describe and use the singleton, adaptor, and observer design patterns
  • 3. 3 Object-Oriented Analysis and Design with the Unified Process Objectives (continued)  Explain why enterprise-level systems require special design consideration  Apply UML deployment architectural notation to Web-based systems  Explain how Web services work to obtain information on the Internet
  • 4. 4 Object-Oriented Analysis and Design with the Unified Process Overview  Model system and object behavior  Statecharts  Protect and stabilize systems  Protection from variations and indirection  Establish best practices in system construction  Design patterns, or templates  Design for enterprise-level and Web-based systems  Distributed and networked environments
  • 5. 5 Object-Oriented Analysis and Design with the Unified Process Modeling System Behavior and Method Logic with Statecharts  Statecharts were used in the requirements discipline to capture status conditions of objects  Statecharts are used in the design discipline to  Define the behavioral constraints of the system classes created during design ◘Windows menus, authentication and security classes, error-handling classes  Describe the method logic within class methods ◘Action-expressions contain information that help define method logic
  • 6. 6 Object-Oriented Analysis and Design with the Unified Process System-level Statecharts  Designate the states and processing controls of a system  Which menu items are enabled or disabled  Which windows are modal  Which tool bars and icons are active  Document possible options presented to users  Use state variables to record the value of the current state
  • 7. 7 Object-Oriented Analysis and Design with the Unified Process Figure 9-1 Logon statechart for a computer system
  • 8. 8 Object-Oriented Analysis and Design with the Unified Process Messages, Transitions, and Methods  A message causes a transition to fire  A transition in a statechart is the execution of a method  A method signature is defined by the message to a destination object  Action expressions in a statechart define method logic  Describes the actions to be performed during a transition
  • 9. 9 Object-Oriented Analysis and Design with the Unified Process Figure 9-2 Comparison of methods, messages, and transitions
  • 10. 10 Object-Oriented Analysis and Design with the Unified Process Action-expressions and Method Logic  A sequence diagram may not contain enough internal details about a method  Design statecharts extend requirements statecharts  Action-expressions contain logic for later coding  Transitions that allow the object to remain in the same state  Temporary states for inter-model consistency  Decision pseudostates to indicate decision points on a paths
  • 11. 11 Object-Oriented Analysis and Design with the Unified Process Figure 9-4 Statechart for Order
  • 12. 12 Object-Oriented Analysis and Design with the Unified Process Figure 9-5 Design statechart for Order
  • 13. 13 Object-Oriented Analysis and Design with the Unified Process Design Principles-Protection From Variations  Parts of a system that are unlikely to change are segregated from those that will  Drives the multilayer design pattern  Stable business logic can be protected from variations in the user interface  Changes in the business logic are isolated to the controller class
  • 14. 14 Object-Oriented Analysis and Design with the Unified Process Design Principles-Indirection  Indirection is an implementation of the protection from variations principle  Decouples classes or other system components by placing an intermediate classes between them  Used in many corporate security systems between an internal network and the Internet  A proxy server catches all incoming messages and redistributes them to the recipients
  • 15. 15 Object-Oriented Analysis and Design with the Unified Process Importance of Design Patterns  Standard design templates can speed OO design  Patterns can exist at different levels of abstraction  At the most concrete level, a class definition with code  At the most abstract level, an approach to a problem  Patterns should contain five main elements  Pattern name, problem, solution, example, benefits and consequences
  • 16. 16 Object-Oriented Analysis and Design with the Unified Process Figure 9-6 Pattern description for the controller pattern
  • 17. 17 Object-Oriented Analysis and Design with the Unified Process Basic Design Patterns  The authors of Elements of Reusable Object- Oriented Software (referred to as the Gang of Four) developed a basic classification scheme for patterns (Figure 9-7)  The 23 GoF patterns are some of the most fundamental and important patterns in use  Scores of other patterns have been defined  For example, both Java and .NET have sets of enterprise patterns
  • 18. 18 Object-Oriented Analysis and Design with the Unified Process Figure 9-7 Classification of design patterns
  • 19. 19 Object-Oriented Analysis and Design with the Unified Process Singleton Pattern  For classes that must have only one instance, but need to be invoked from several classes and locations within the system  The class itself controls the creation of only one instance  A static variable of the class refers to the object that is created  A class method instantiates the object on the first call, and returns a reference to the object on subsequent calls
  • 20. 20 Object-Oriented Analysis and Design with the Unified Process Figure 9-8 Singleton pattern template
  • 21. 21 Object-Oriented Analysis and Design with the Unified Process Adaptor Pattern  Plugs an external class into a system  Converts the method calls from within the system to match the method names in the external class  A standard solution for protection from variations  Insulates the system from frequently changing classes  An interface is frequently used to specify and enforce the use of correct method names
  • 22. 22 Object-Oriented Analysis and Design with the Unified Process Figure 9-10 Adapter pattern template
  • 23. 23 Object-Oriented Analysis and Design with the Unified Process Observer pattern  Used to handle event-processing and reduce coupling  The domain class  Allows other classes to “subscribe” as listeners  “Publishes” the changes to the listeners  The windows class  Sends a reference of itself to subscribe as a listener  Implements the method to be invoked when notified ◘Inherits the method from the listener interface
  • 24. 24 Object-Oriented Analysis and Design with the Unified Process Figure 9-11 Three classes in the Create new order use case
  • 25. 25 Object-Oriented Analysis and Design with the Unified Process Figure 9-12 Implementation of the observer pattern
  • 26. 26 Object-Oriented Analysis and Design with the Unified Process Figure 9-13 Observer pattern template
  • 27. 27 Object-Oriented Analysis and Design with the Unified Process Designing Enterprise-level Systems  Enterprise-level systems share components among multiple people or groups in an organization  Enterprise-level systems almost always use multiple tiers of computers  Can be client/server network-based or Internet based  Designed with deployment diagrams  A type of implementation diagram that shows physical components across different locations
  • 28. 28 Object-Oriented Analysis and Design with the Unified Process Figure 9-14 Differences between client/server and Internet systems
  • 29. 29 Object-Oriented Analysis and Design with the Unified Process UML Notation for Deployment Diagrams  Component  Executable module or program  Has an application program interface (API) that is available to the outside world  Node  A physical entity at a specific location  Frameset  A high-level object that holds items to be displayed by a browser
  • 30. 30 Object-Oriented Analysis and Design with the Unified Process Figure 9-15 UML component notation
  • 31. 31 Object-Oriented Analysis and Design with the Unified Process Figure 9-16 UML node notation Figure 9-17 UML extension for frameset
  • 32. 32 Object-Oriented Analysis and Design with the Unified Process Simple Internet Architecture  Used for viewing static information  The browser component executes on the client computer  The Internet server component executes on the server computer  Pages reside on the server and are sent to the browser for display  Program logic is inserted through scripting languages, applets, or other controls
  • 33. 33 Object-Oriented Analysis and Design with the Unified Process Figure 9-18 Simple Internet architecture
  • 34. 34 Object-Oriented Analysis and Design with the Unified Process Two-layer Architecture  Primarily captures information from the user and updates the database  The domain layer and data access layer are usually combined  Input data is sent to a CGI or an application server  The user-interface classes often contain the business logic and data access  Processing takes place with servlets (Java) or code behind classes (.NET)
  • 35. 35 Object-Oriented Analysis and Design with the Unified Process Figure 9-19 Two-layer Internet architecture
  • 36. 36 Object-Oriented Analysis and Design with the Unified Process Three-layer Architecture  Separates domain layer and data access layers  Necessary for systems with complex business logic or multiple user interfaces  Using CGI  Provide a use case controller for each form  Using an application server  Java tools: Java Server Pages and servlets  .NET tools: Common Runtime Language and code behind classes
  • 37. 37 Object-Oriented Analysis and Design with the Unified Process Figure 9-20 Three-layer Internet architecture
  • 38. 38 Object-Oriented Analysis and Design with the Unified Process Web Services  A program that provides a service via the Internet  The service is posted in a directory so that systems can find it  Requests for information go to the UDDI directory  UDDI provides the Internet address of a program offering that service  The application then requests the information  All communication is based on XML to allow for generic data exchange
  • 39. 39 Object-Oriented Analysis and Design with the Unified Process Figure 9-21 Invoking a Web service
  • 40. 40 Object-Oriented Analysis and Design with the Unified Process Summary  Design statecharts  Specify precise behavior and constraints of the various portions of the final system  Describe the method logic within an object  Good design is based on two factors  Good principles  Standard design patterns
  • 41. 41 Object-Oriented Analysis and Design with the Unified Process Summary (continued)  Protection from variations  Separates components that are likely to change  Indirection  Intermediate class provides an interface between elements  Design pattern examples  Singleton  Adaptor  Observer