1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development...
-
Upload
kelley-gibbs -
Category
Documents
-
view
217 -
download
2
Transcript of 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development...
![Page 1: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/1.jpg)
1/26
On-demand Learning Series
Software Engineering of Web Application
- Object-Oriented Development & UML
Hunan University, Software School
![Page 2: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/2.jpg)
2/26
1.1 An object has behaviors In old style programming, you had:
data, which was completely passive functions, which could manipulate any data
An object contains both data and methods that manipulate that data (Encapsulation) An object is active, not passive; it does things An object is responsible for its own data
Information Hiding But: it can expose that data to other objects
1 OO Introduction
![Page 3: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/3.jpg)
3/26
1.2 An object has state An object contains both data and methods that manipulate that
data The data represent the state of the object Data can also describe the relationships between this object and
other objects
Example: A BankAccount might have A balance (the internal state of the account) An owner (some object representing a person)
1 OO Introduction
![Page 4: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/4.jpg)
4/26
1.3 Example: A “Rabbit” object You could (in a game, for example) create an object
representing a rabbit It would have data:
How hungry it is How happy it is Where it is
And methods: eat, run, dig
1 OO Introduction
![Page 5: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/5.jpg)
5/26
1.4 Classes describe objects
Every object belongs to (is an instance of) a class fields, or variables methods
A class is like a template, or cookie cutter
1 OO Introduction
![Page 6: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/6.jpg)
6/26
1.5 Other Concepts Inheritance Polymorphism Message communication Access Control
1 OO Introduction
![Page 7: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/7.jpg)
7/26
1.6 Object-oriented development Object-oriented analysis, design and programming are related but
distinct. OOA is concerned with developing an object model of the application
domain. OOD is concerned with developing an object-oriented system model
to implement requirements. OOP is concerned with realising an OOD using an OO programming
language such as Java or C++.
1 OO Introduction
![Page 8: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/8.jpg)
8/26
1.7 Characteristics of OOD Objects are abstractions of real-world or system entities and manage
themselves. Objects are independent and encapsulate data and method. System functionality is expressed in terms of object services. Shared data areas are eliminated. Objects
communicate by message passing. Objects may be distributed and may execute
sequentially or in parallel.
1 OO Introduction
![Page 9: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/9.jpg)
9/26
1.8 Advantages of OOD Easier maintenance. Objects may be
understood as stand-alone entities. Objects are potentially reusable components. For some systems, there may be an obvious
mapping from real world entities to system objects.
1 OO Introduction
![Page 10: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/10.jpg)
10/26
2.1 The Unified Modeling Language Standard language for visualisation, specification, construction
and documentation of problems/solutions in a software-intensive system.
2 UML Introduction
![Page 11: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/11.jpg)
11/26
2.2 What’s UML Not a software development process or methodology May be used in all processes/phases in the development
cycle, across different implementation technologies
2 UML Introduction
![Page 12: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/12.jpg)
12/26
2.3 UML Concepts UML is used to:
Show main functions and boundaries in a system using use cases and actors.
Illustrate use case realisations using interaction diagrams. Represent a static structure of a system using class diagrams. Modelling object behaviour using state diagrams. Show implementation of the physical architecture using component and
deployment diagrams. Enhance the functionality using stereotypes.
2 UML Introduction
![Page 13: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/13.jpg)
13/26
2.4 Use UML: Diagram Type Structure Diagram (Static)
Class Diagram(Object Diagram) Component Diagram Deployment Diagram
Behavior Diagram (Dynamic) Use case Diagram Sequence Diagram Collaboration Diagram State chart Diagram Activity Diagram
2 UML Introduction
![Page 14: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/14.jpg)
14/26
2.5 Use Case Diagram
Actor
Use Case
2 UML Introduction
In-Store Customer
Telephone Customer
Customer
Identify Movie
Open Account
Return Movie
Clerk
Review Account Status
![Page 15: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/15.jpg)
15/26
DVDMovie VHSMovie VideoGame
Customer
RentalItem
RentalInvoice1
1..*
1
Checkout Screen
0..1
1
1..*
1 0..1
Simple
Association
Class
Abstract
Class
Simple
Aggregation
Generalization
Composition
(Dependency)
Multiplicity
2.6 UML Class Diagram
![Page 16: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/16.jpg)
16/26
: Clerk : CheckoutMgr cust :
Customer : Inventory : RentalItem
1: findCustomer( )
2: searchCustomer()
3: enterMovie()
4: search(String)
5: rentMovie()
6: generateRentalItem()
7: printInvoice()
8: generateRentalTotal()
2.7 Sequence Diagram - Rent Movie
2 UML Introduction
Object
Lifeline
ActivationMessage
![Page 17: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/17.jpg)
17/26
: Employee
: CheckoutMgr Cust : Customer
: Inventory
: Rentalitems
1: find customer( )3: enter movie()5: rent movie()7: printInvoice() 2: searchCustomer( )
4: search(String)
6: generateRentalItem()8: generateRentalTotal()
2.8 Collaboration Diagram - Rent Movie
Object
Message
2 UML Introduction
![Page 18: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/18.jpg)
18/26
Clerk User Interface
Customer DataBusiness
System client
<<facade>>
Rental Screen
(to business system)
Business System
2.9 Package Diagram
ClassPackage
2 UML Introduction
![Page 19: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/19.jpg)
19/26
Suppl i ed by Mi crosof t
DB Server i nterf ace (dbsvr. dl l )
<<l i brary>>
Appl i cat i on Framework(appf r. dl l )
<<l i brary>>
Vi edo Workstat i on(vstat i on. exe)
<<appl i cat i on>>
2.10 Component DiagramComponent
Dependency
Note
2 UML Introduction
![Page 20: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/20.jpg)
20/26
Node
Communication
Association
2.11 Deployment Diagram
2 UML Introduction
Pr i nt er
Cl i ent
HTTP Web Server
DB Server
Chi na Uni onPay Syst em Server
<<i nt er net >>
Tr ai nServer
Cr edi t Check
Or acl e 9i
I nt ernet Expl orer 6. 0Onl i ne Tr ai nReservat i on
![Page 21: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/21.jpg)
21/26
I dentyfiy Cal l er
Obtai n Name
Current Customer?
Open Account?
Create Account
[ No ]
[ Yes ]
[ No ]
[ Yes ]
Action Activity
Start State
Decision
End State
2.12 Activity Diagram
2 UML Introduction
![Page 22: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/22.jpg)
22/26
Validate
do/ Check account
Check-Out
do/ check-out video
Check-Out Complete
customer appears
[ account not valid ]
[ account valid ] / get first video
[ no more videos ]
[ more videos ] / get next video
2.13 State Diagram
State
Transition
ActivityGuard
Action
Event
2 UML Introduction
![Page 23: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/23.jpg)
23/26
2.14 Relations between UML Diagram
Use CaseRequriments Class (E)
State Chart
Sequence
Class (S)
Activity
Collaboration
2 UML Introduction
![Page 24: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/24.jpg)
24/26
2.15 Rational Unified Process
2 UML Introduction
![Page 25: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/25.jpg)
25/26
Reading Materials Object-Oriented Design & Patterns UML Notation Guide Software Development with UML
UML Programming Guide 中文教程
![Page 26: 1/26 On-demand Learning Series Software Engineering of Web Application - Object-Oriented Development & UML Hunan University, Software School.](https://reader036.fdocuments.net/reader036/viewer/2022081519/56649f2f5503460f94c497b6/html5/thumbnails/26.jpg)
26/26
Questions If You don’t know the answer, maybe I can
make one up!