You are on page 1of 25

University of Science, VNU-HCM

Faculty of Information Technology

Software Architecture
Assoc. Prof. TRAN Minh Triet
Department of Software Engineering
Nội dung

❖ Introduction
❖ Multi-layer Architecture
❖ Multi-tier Architecture

2
1-layer

User I/O
Event Handler
User Interface Main Logic
Data Processor

Data X 3
2-layer

User I/O
EventI/O
Handler
User Interface Event
MainHandler
Logic
Data Processor

Data X 4
3-layer

User
I/O
User Interface Event Handler

Main Logic
X DataProcessor
Data Processor

DL_X

Data X 5
Layers?

❖ GUI (Presentation) Layer


❖ Business Logic Layer
❖ Data Access Layer

6
Communication between laysers

GUI

Business logic

Data Access

Data
Raw data, data rows…

7
Communication between laysers

GUI

Business logic

Data Access

Data Transfer Object (DTO)


Data
Raw data, data rows

8
Multi-layer Architecture

❖ Decoupling
❖ Re-usability
❖ Responsibility - Delegation

9
Exception Handling

GUI

Error messages
Errors while
treating data input GUI layer Error Handling

Thrown business
exceptions Log
Business
Errors while
treating in
business layer Business Error Handling

Database error codes

Database errors Database Error Handling


while executing
Database (controlled by DBMS)
10
1-tier, 3-layer

Physical view Logical view

GUI

Application + Data Business logic

Data Access

Data

11
2-tier, 3-layer

Physical view Logical view

Client tier GUI

Business logic

Data Access

Data
Data tier

12
3-tier, 3-layer

Presentation tier Browsers GUI

Local clients

Logical view
Web Server

Web Server Application Web

Business logic

Business tier
Data Access

Data tier Data

13
Physical tiers

14
Physical tiers

15
“Tiers of layers”

16
Business Layer at Storage Tier

17
Business Layer at Client Tier

18
Example

19
Example

Presentation
Layer

Business
Layer

Data Access
Layer

20
Example

Presentation
Layer

Business
Layer

Data Access
Layer

21
Example

Presentation
Layer

Business
Layer
WS client Web service
Data Access
Layer

22
Example

Presentation
Layer

WS client Web service


Business
Layer

Data Access
Layer

23
Example

Presentation
Layer

WS client Web service


Business
Layer

Data Access
Layer

24
Example

Presentation
Layer

WS client Web service


Business
Layer
WS client Web service
Data Access
Layer

25

You might also like