Unit-2: UNIT - 2, OO Methodologies, Dept. of MCA, APEC, MELMARUVATHUR
Unit-2: UNIT - 2, OO Methodologies, Dept. of MCA, APEC, MELMARUVATHUR
Unit-2: UNIT - 2, OO Methodologies, Dept. of MCA, APEC, MELMARUVATHUR
Rumbaugh Methodology Booch Methodology Jacobson Methodology Patterns Frameworks Unified Approach Unified Modeling Language Use case class diagram Interactive Diagram Collaboration Diagram State Diagram Activity Diagram.
Chapter Objectives
You should be able to define and understand
Object Oriented methodologies. - The Rumbaugh OMT - The Booch methodology - Jacobsons methodologies Patterns Frameworks
Rumbaughs Object Modeling Technique (OMT) -A method for analysis,design and implementation by an object oriented technique. -fast and intuitive approach for identifying and modeling all objects making up a system. -Class attributes, methods, inheritance and association can be expressed easily. -Dynamic behavior of objects can be described using the OMT dynamic model. -Detailed specification of state transitions and their -descriptions within a system
3 UNIT - 2,OO Methodologies, Dept. of MCA, APEC, MELMARUVATHUR.
models System Design: Basic architecture of the system. Object Design: static, dynamic and functional models of objects. Implementation: reusable, extendible and robust code.
object model & data state diagrams & event flow data flow & constraints
dictionary
A dynamic model -
diagrams
A functional model -
Object Model
structure of objects in a system.
Object Diagram
Classes interconnected by association lines
and events
processes in a business. Simple and intuitive method for describing business processes without focusing on the details of computer systems.
10
11
Process- any function being performed Data Flow- Direction of data element movement Data Store Location where data is stored External Entity-Source or Destination of a data element
12
13
14
describe roles and responsibilities of objects Object diagrams describe the desired behavior of the system in terms of scenarios State transition diagrams
to map out where each class & object should be declared Process diagrams to determine to which processor to allocate a process Interaction diagrams describes behavior of the system in terms of scenarios
15 UNIT - 2,OO Methodologies, Dept. of MCA, APEC, MELMARUVATHUR.
16
system.
17
2.
3. 4.
5.
Conceptualization Analysis & Development of the model Design or create the system architecture Evolution or implementation Maintenance
18
19
JACOBSON METHODOLOGIES
Use Cases. Object Oriented Software Engineering. Object Oriented Business Engineering.
20
Use Cases
Understanding system requirements Interaction between Users and Systems
How and when the use case begins and ends. The Interaction between the use case and its actors, including
when the interaction occurs and what is exchanged. How and when the use case will need data stored in the system. Exception to the flow of events How and when concepts of the problem domain are handled.
21
OOSE
Object Oriented Software Engineering. Aim for the development of large, and real time systems.
22
OOBE
Object Oriented Business Engineering
23
PATTERNS
It is an instructive information that captures the
essential structure and insight of a successful family of proven solutions to a recurring problem that arises within a certain context and system of forces.
24
It is a proven concept.
The Solution is not obvious. It describes a relationship. The pattern has a significant human component.
25
Patterns
Patterns
Generative Patterns
(describe recurring phenomena with saying how to reproduce them) 26
Patterns Template
Essential Components should be clearly recognizable
on reading a pattern:
Name Problem Context Forces-constraints and conflict with one another and with the
27
goal we wish to achieve.( indication of their priorities). Solution- how to realize the desired outcome. Examples- sample applications Resulting context- the state or configuration of the system after the pattern has been applied. Rationale this tells how the pattern actually works, why it works, and why it is good. Related Patterns Known uses
Antipatterns
A pattern represents a best practice, whereas
an antipatterns represents worst practice. Antipattern comes in two varieties Those describing how to get out of a bad solution and how to proceed from there to a good solution.
28
Capturing patterns
A pattern should help its users comprehend
existing systems, customize system to fit user needs, and construct new systems. The process of looking for patterns to document is called pattern mining(or sometimes reverse architecting). Guidelines
Focus on practicability Aggressive disregard of originality Nonanonymous review Writers workshops instead of presentations Careful sditing
29 UNIT - 2,OO Methodologies, Dept. of MCA, APEC, MELMARUVATHUR.
Frameworks
Way of delivering application development
patterns to support best practice sharing during application development. A framework is a way of presenting a generic solution to a problem that can be applied to all levels in a development.
Can be viewed as the implementation of a
30
Benefits of Frameworks
Reusability
Modularity
Extensibility Inversion of Control
31
frameworks. Design patterns are smaller architectural elements than frameworks. Design patterns are less specialized than frameworks.
32
Model
Use case model Domain model Analysis object model Implementation model Test model
33
Model
Types of model
1. 2. 3. 4. 5.
Use case model defines the outside (actors) & inside (use case) of the systems behavior. Domain model maps real world object into the domain object model. Analysis object model how source code should be carried out & written. Implementation model represents the implementation of the system. Test model test plans, specifications & reports.
34
Model
Static
Provides a systems parameters at rest or at a specific point in time.
35
Dynamic
Represents a systems behaviors that, taken together, reflect its behavior over time. (e.g.) interaction & activity diagrams
Why modeling
Blue print
Clarity
Familiarity Maintenance Simplification
36
Advantages of modeling
Easy to express complex ideas
Reduce complexity
Enhance & reinforce learning and training Low cost Easy to change the model
37
for visualizing, specifying, constructing & documenting the artifacts of a software system. The rules and semantics of a model are expressed in English, in form known as object constraint language(OCL).
38
History of UML
Booch method by Grady Booch Object Modeling Technique (OMT) by Jim Rumbaugh Object Oriented Software Engineering (OOSE) by Ivar Jacobson
Booch was great in design OMT & OOSE were great in analysis
39
History of UML
UML 1.0 (January 1997)
UML 1.1 (November 1997) UML 1.3 (Current Minor revision 1999) UML 1.4 (Planned Minor revision 2000) UML 2.0 (Planned Major revision 2004)
40
Primary goals
Provide users a ready-to-use, expressive visual modeling
language so the can develop and exchange meaningful models. Provide extensibility and specialization mechanisms to extend the core concept. Independent of particular programming languages. Provide a formal basis for understanding the modelling language. Encourage the growth of the OO tools market. Support higher-level development concepts. Integrate best practices and methodologies.
41
UML Concepts
The interaction of your application with the outside world (use case diagram) Visualize object interaction (sequence & collaboration diagrams) The structure of your system (class diagram) View the system architecture by looking at the defined package. The components in your system (component diagram)
42
systems parts
43
UML Diagrams
5.
Use case diagram Activity diagram Sequence diagram Collaboration diagram Class diagram
Interaction diagram
44
Behavior Diagram
Sequence diagram
Collaboration diagram
State chart diagram Activity diagram
45
UML Diagrams
1.
2.
3. 4.
5.
6. 7.
8.
Class diagram Use case diagram Activity diagram Sequence diagram Collaboration diagram State chart diagram Component diagram Deployment diagram
46
1. Class diagram
Class a set of objects that share the same attributes, operations & relationships. It represented by a compartmentalized rectangle. It shows the structure of your software. 3 compartments
1. 2.
3.
47
1. Class diagram
1. 2. 3.
Top shows class name Middle shows class attributes Bottom shows class operation
48
1. Class diagram
1.
Attributes defines the characteristics or structure of a class. displayed in the middle of the compartmentalized rectangle.
Attributes
49
1. Class diagram
2. Operation the service provided by the class. displayed in the bottom of the compartmentalized rectangle.
Operations
50
relationships. Address the static view of a system. Actor user (or) someone / something outside the system that interacts with the system (it must be a noun) & it is represented by a stickman. contd
51
a verb) & it is represented by an oval. Relationship illustrates a connection among model elements.
Unidirectional
Bi-directional
WITHDRAW CUSTOMER
CASH DISPENSER
CHECK BALANCE
53
loans, calculate PF, prepare IT returns, calculate HRA & check salary
54
Count leave
Customer
Disburse salary
Check loans
Prepare IT returns
55
3.Activity Diagram
It shows the flow of events with our system &
what is going on inside a use case. We draw the activity diagram for each & every use case. Login (use case) (e.g.) ATM It is showing flow of control from activity to activity.
56
3.Activity Diagram
Activity it represents the performance of a
task within the workflow. Activity is represented by a lozenge (horizontal top and bottom with convex sides) Start state shows the beginning of a workflow on an activity diagram. There is only one start state.
57
3.Activity Diagram
A start state is represented by a solid circle. An end state represents a final or terminal state
58
3.Activity Diagram
A state transition shows what activity follows after
59
3.Activity Diagram
A decision is a point in an activity diagram
where guard conditions are used to indicate different possible transitions. It is represented by a diamond. Guard conditions control the transition of a set of alternate transitions that follows after the activity has been completed.
60
3.Activity Diagram
AND
Synchronization bar
61
Joint
3.Activity Diagram
A synchronization bar allows you to show
concurrent threads in a work flow of a use case. It represented by a thick horizontal or vertical line.
62
3.Activity Diagram
A swimlane is used to partition an activity diagram
63
Customer Enters the login details System retrives the details System validates the customer
[ False ]
64
4.Sequence Diagram
It shows step by step what must happen to accomplish a piece of functionality provided by the system. It has 2Ds.
1. 2.
65
4.Sequence Diagram
Life line the existence object at a particular time. Objects are shown at the top. The object role is shown as a vertical dashed line, the life line.
66
4.Sequence Diagram
A message is the communication between 2 objects that triggers an event. It is represented by a labeled arrow. Each message is represented by an arrow between the life lines of 2 objects.
67
4.Sequence Diagram
A focus of control shows the period of time during which an object is performing an action, either directly or through a subordinate procedure.
68
: Customer
: LoginForm
: LoginController
: CustomerInfo
69
5.Collaboration Diagram
It displays objects and their links to one other.
70
5.Collaboration Diagram
2.
3. 4.
71
5.Collaboration Diagram
user data + logic / the representation of some real world entity. 3. Links a pathway for communication between objects. represented by a solid line between 2 objects 4. Messages the communication between objects that triggers an event. represented by a labeled arrow above the link.
1. 2.
Actors Objects
72
: LoginForm : Customer
3: Validate( )
4: getLoginDetails( )
: LoginController : CustomerInfo
73
contain one or more compartments. Name compartment holds the name of the state. Internal transition compartment list of actions / activities Start & end states
74
7.Component Diagram
It shows relationship between the components in
the system.
A component may be a software component [for
(e.g.) a.h file in C++ (or) a .java file in Java], a run time component [for (e.g.) a.DLL file]
75
8. Deployment Diagram
It shows the configuration of run time processing
elements & the software components, processes & objects that live in them. It shows the nodes in the system & the connections between them.
76
Review
Name the 2 benefits of visual modeling.
What is UML?
Name three UML diagrams. What are the elements of a use-case
77
Module Summary
Visual modeling
1. 2. 3.
4.
5.
The interaction of your application with the outside world (use case diagram) Visualize object interaction (sequence & collaboration diagrams) The structure of your system (class diagram) View the system architecture by looking at the defined package. The components in your system (component diagram)
78
Module Summary
UML
The UML is a graphical / standard language for visualizing, specifying, constructing & documenting the artifacts of a software system.
79
Module Summary
Use case diagram Activity diagram Sequence diagram Collaboration diagram Class diagram State chart diagram Component diagram Deployment diagram
80
81
Views
Logical View (Analyst / Designer) Structure Implementation View (Programmers) Software Management
Deployment View (System Engineering) System topology, Delivery, installation & Communication
82
Views
Use-case view Logical view Process view Component view (Implementation view) Deployment view
These views together create what we call the 4+1 Architectural View
UNIT - 2,OO Methodologies, Dept. of MCA, APEC, MELMARUVATHUR.
83
developer.
Essential to analysis, design and test
activities.
84
Logical View
It supports the functional requirements of the
system.
It includes use-case realizations, class and
interaction diagrams.
It can also include state chart and activity
diagrams.
85
Process View
Addresses the performance, scalability and
environment.
86
87
Deployment View
Addresses issues like deployment, installation
and performance.
.Used for distributed system only.
88
The options window is not technically part of the rose interface. However, it is important in your initial setup.
UNIT - 2,OO Methodologies, Dept. of MCA, APEC, MELMARUVATHUR.
89
The Browser
The browser allow you to textually
view and navigate the views and diagrams in rational rose. Display the elements that you have modeled. if an element doesnt appear in the browser, it not a part of your modeled system.
90
Diagram window
The diagram window allows you to create and
91
Diagram Toolbar
The diagram toolbar includes the
elements to build a diagram. Each diagrams toolbar unique to that diagram. It is active only when the diagram is displayed.
92
Documentation window
Used to create, view or modify text that explains a
93
Log window
Reports progress, result and errors.
progress and error messages to this window. To display log window, go to View menu, click LOG to show or hide the window. To clear the contents of log window, click CLEAR LOG.
94
Options window
Used to set all of your default for modeling. Note that if you change default, existing model
95
There are two basic tool techniques we will discuss before you begin the labs. They are
1. 2.
96
browser? Rose does the following. Removes the selected elements from the model Removes all icons representing the elements from all diagrams on which they appear. Delete the specification for the element .
97
1.
2.
3.
There are three ways to delete an element. Click the element in the diagram and then press ctrl-D Right click the element in browser, and then click delete Click the element in the browser or diagram. From the edit menu, click delete from model.
98
99
Review
What are views?
diagram.
100
Module Summary
Rational Rose uses views & diagrams to depict varying perspectives and a systems parts. There are 5 views in Rational Rose :
1. 2. 3. 4.
5.
Use case view Logical view Process view Component / implementation view Deployment view
101
Module Summary
Diagrams are a graphical means to view a systems parts. The browser shows all of your model elements Diagram window is to create a view Diagram toolbar includes the elements to build a diagram. Documentation window is used to create, view or modify text that explains a selected item within a diagram.
102
Module Summary
Log window reports progress, results & errors.
(or) go to edit menu, click DELETE FROM MODEL. Adding diagram elements click the element & then click in the diagram window.
103
Thank You!
104