Upload
others
View
29
Download
0
Embed Size (px)
Citation preview
Introduction to Object Oriented Modeling
R K JoshiIIT Bombay
R.K. Joshi, IIT Bombay
R.K. Joshi, IIT Bombay
Concepts to Realization
R.K. Joshi, IIT Bombay
Realization to Conceptual Understanding
R.K. Joshi, IIT Bombay
Need to Model Different aspects of/for the software to be built
R.K. Joshi, IIT Bombay
R.K. Joshi, IIT Bombay
Conceptual ideas
R.K. Joshi, IIT Bombay
Conceptual ideas
End goals
R.K. Joshi, IIT Bombay
Conceptual ideas
End goals
User interfaces
R.K. Joshi, IIT Bombay
Conceptual ideas
End goals
User interfaces
Product Implementation Models
R.K. Joshi, IIT Bombay
Conceptual ideas
End goals
User interfaces
Product Implementation Models
Deployment Models, N/W, Architecture
R.K. Joshi, IIT Bombay
Conceptual ideas
End goals
User interfaces
Product Implementation Models
Deployment Models, N/W, Architecture
Man month
R.K. Joshi, IIT Bombay
Conceptual ideas
End goals
User interfaces
Product Implementation Models
Deployment Models, N/W, Architecture
Man month Financial Model
R.K. Joshi, IIT Bombay
Conceptual ideas
End goals
User interfaces
Product Implementation Models
Deployment Models, N/W, Architecture
Man month Financial Model
The software development process
R.K. Joshi, IIT Bombay
Modeling
R.K. Joshi, IIT Bombay
Modeling
Modeling tools
R.K. Joshi, IIT Bombay
Modeling
Modeling tools Microscopic views&
Iterative Refinement
R.K. Joshi, IIT Bombay
Modeling
Modeling toolsMicroscopic views
&Iterative Refinement
Documentation
R.K. Joshi, IIT Bombay
Product Models
Structure Dynamics
R.K. Joshi, IIT Bombay
Static Modeling
Furniture?Rooms?
Flats?
Building?Electrical Wiring?
Water pipelines
Air ducts?
R.K. Joshi, IIT Bombay
Models throughout the Lifecycle
• Per class• Per object• Collaborating classes• Collaborating objects• Collection of classes (source code)• Location of classes, modules ..
R.K. Joshi, IIT Bombay
Structural (Static) Modeling
• Class diagrams• Object Diagrams• Deployment Diagram• File directory hierarchy• Component Package diagrams• Entity Relationship
R.K. Joshi, IIT Bombay
A Static Model
Push ()Pop()Size()
Stack
R.K. Joshi, IIT Bombay
Visualcomponent
draw ()
Decorator
draw()Component->draw()
TextView
operation ()
Borderdraw()
drawBorder()
Scrollerdraw ()
drawScroller
component
Decorator::draw()drawBorder()
Another Static Model
R.K. Joshi, IIT Bombay
Dynamic Modeling
R.K. Joshi, IIT Bombay
Dynamic Modeling
How does the groupcollaborate?
R.K. Joshi, IIT Bombay
Dynamic Modeling
How does the groupcollaborate?
How does the individualrespond?
R.K. Joshi, IIT Bombay
What happens amongst the objects?
R.K. Joshi, IIT Bombay
Interaction Diagram: Item issue use case
:Operator iw:IssueWin tr1: Issue b:Book u:User
committed
issue(bid,uid)
supply bid,uid
isIssuable?hasToken?
issue (b)
issue (u)
destroy
create
bind using bid
bind using uid
R.K. Joshi, IIT Bombay
What happens inside an object?
R.K. Joshi, IIT Bombay
A State Machine
Full
Empty Partial
insert [size <MAX-1]
insert [size =MAX-1]
insert [size =MAX-1]
fetch [size >1]
fetch [size =1]
fetch [size =1]
Initial stateinsert [size <MAX-1]
R.K. Joshi, IIT Bombay
Including Error Conditions
Full
Empty Partial
insert [SIZE <MAX-1]
insert [SIZE =MAX-1]
insert [SIZE =MAX-1]
fetch [SIZE >1]fetch
[SIZE =1]
fetch [SIZE =1]
Initial state
fetch / signal error
insert / signal error
insert [size <MAX-1]
R.K. Joshi, IIT Bombay
How are various interactions/activities
linked with each other?
R.K. Joshi, IIT Bombay
Activity Diagram Scan
User’s barcode
ScanBook barcode
enter user id by hand
[scanner failed][scan okay]
Performreturn transaction
enter bookid by hand
[scanner failed]
[scan okay]
R.K. Joshi, IIT Bombay
How much can you model?
• Can the full system be specified during modeling?
• What other modeling languages exist?
• Can the full system be generated from the model?
• Benefits of Modelchecking• Modeling language vs.
implementation language
R.K. Joshi, IIT Bombay
Code Generation
• Class structures• Basic Relations• Basic constructions• Helper Code• Service Orientation
– Intermediate formats and Platform dependent code generation techniques
R.K. Joshi, IIT Bombay
Traceability
• Models – Seamlessness
• Moving from early conceptualization to construction and eventually into delivery and maintenance
• Changes reflected back
R.K. Joshi, IIT Bombay
Summary
• Model ---> Implementation• Implementation --> Model• Forward engineering
– Specify/model first and then go on to build
• Many facets of a system --> many models
• Consistency between models• Traceability to Implementation• Automatic Code Generation