OH-slides in powerpoint

Download Report

Transcript OH-slides in powerpoint

An abstract object model
v1 : ViewA
access
propagate
access
m : Model
propagate
access
c1 : ControllerA access
v2 : ViewB
access
access
c2 : ControllerB
• Model: provides central functionality of the
application, is aware of its dependent view and
controller components
• View: each view corresponds to a particular style
and format of presentation of information. View
retrieves data from model and updates itself when
data has been changed in another view. View
creates its own controller.
• Controller: accepts user input events that trigger
operations/changes within the model. These may
trigger updates in other views ensuring they are up
to date.
• See also Observer design pattern.
MyView
viewData
depends on
Model
coreData
setOfObservers
attach(Observer)
detach(Observer)
notify()
getData()
modifyData()
1
initialize()
displayData()
* update()
1
1
MyController
viewData
updates
1
updates
*
initialize()
changeData()
update()
c1: Controller
changeData()
m: Model
modifyData()
v1: View
notify()
update()
getData()
update()
getData()
displayData()
4.3 Independent components:
executing in parallel, with communication,
aka object-oriented architectures.
e.g. simple OOP, peer to peer (2-way clientserver)
4.4 Virtual machines:
an interpreter (high-level machine) + a
program in a special purpose
(application-oriented) language
VM
I/O
e.g. Java VM, application-oriented PLs
4.5 Data Centered:
Built around a large data collection, aka
repository
App3
App1
App2
Example: Client-Server
Client
*
requester
*
provider
Server
service1()
service2()
…
serviceN()
Request for service using RPC or CORBA, Java RMI,
HTTP.
4.6 Layered:
subsystems hierarchically organised, each
layer (1) depending only on layer below, (2)
supplying services to layers above
Example 1
ISO/OSI 7 –layer communication hierarchy
7. Application (mail, telnet, ftp )
6. Presentation (XDR)
5. Session (RPC)
4. Transport (TCP, UDP)
3. Network (IP)
2. Data Link (Ethernet)
Hardware
1. Physical (thinnet, thicknet, UTP)
Example 2: Three-Tier
Database Architecture
3. Interface layer
2. Application logic layer
1. Storage layer
Interface layer: objects dealing with user, windows, forms,
Web pages, etc
Application logic layer: control and entity objects for processing,
Rule checking and notification
Storage layer: implements storage, retrieval and query of persistent
objects
Example 3: Four-Tier Database
Architecture
4. Presentation Client
3. Presentation Server
2. Application logic layer
1. Storage layer
Presentation Client sits on user machine.
Presentation Server sits on server machine
Different kinds of clients and servers possible
Compare with MVC!
Interface
layer
4. WebBrowser
3. Server Side Form
2. DB Connection
1. SQL Query
Interface
layer
Architecture Tradeoff Analysis
Method ATAM
CMU Software Engineering Institute (SEI)
1. Collect scenarios (use cases)
2. Elicit requirements, constraints and environment
3. Describe architectural styles/patterns
4. Evaluate quality attributes, e.g. reliability,
performance, security, flexibility, portability,
testability
5. Identify sensitivity points: attributes sensitive to a
small change in architecture
6. Critique candidate architectures
Once the sensitivity points have been determined,
finding trade-off points is simply the
identification of architectural elements to which
multiple attributes are sensitive.
E.g. The performance of a client-server
architecture might be highly sensitive to the
number of servers. The availability might also be
sensitive to that number. However, the security
might vary inversely with that number (more
points of attack).
So the number of servers is a trade-off point.