Data Access Layer как инструмент управления хранением данных
Необходимость работы со специализированными БД
Ограничение способа доступа к данным на уровне программной архитектуры
Варианты размещения компонентов структуры DAL
Three Tier Architecture
Three Tier Architecture
Three Tier Architecture
Facade
Motivation
Data Access Layer
Data Access Layer
Program to an Interface; Not Implementation
755.77K
Категория: Базы данныхБазы данных

Data Access Layer как инструмент управления хранением данных

1. Data Access Layer как инструмент управления хранением данных

2. Необходимость работы со специализированными БД

Необходимость работы
со специализированными БД

3. Ограничение способа доступа к данным на уровне программной архитектуры

4. Варианты размещения компонентов структуры DAL

5. Three Tier Architecture

Presentation Layer (UI classes)
Business Logic Layer (data classes holding business logic)
Persistent Data Layer (databases, DBMS, data access classes)

6. Three Tier Architecture

Presentation Layer (UI classes)
Business Logic Layer (data classes holding business logic)
Persistent Data Layer (databases, DBMS, data access classes)

7. Three Tier Architecture

Presentation Layer (UI classes)
controller
Business Logic Layer (data classes holding business logic)
façade
Persistent Data Layer (databases, DBMS, data access classes)

8. Facade

Шаблон фасад (англ. Facade)
— структурный шаблон проектирования,
позволяющий скрыть сложность системы путём
сведения всех возможных внешних вызовов к
одному объекту, делегирующему их
соответствующим объектам системы.

9. Motivation

Most software systems
require persistent data (i.e.
data that persists between
program executions).
In general, distributing lowlevel data access logic
throughout a program is not
a good idea (design).
Program
select * from Items
rs.getString("Name")
Data

10. Data Access Layer

A better design is one that includes a data
access layer which encapsulates the details of
the underlying persistence API.
It abstracts the low-level details of persistent
storage.
It provides an interface that is usually a better
match for the style of programming used in
the domain logic. For example, the data access
layer might provide an OO interface onto
relational data.

11.

Program
Program
customer = dao.find(id)
update(customer)
select * from Items
rs.getString("Name")
Data Access Layer
select * from Items
rs.getString("Name")
Data
Data

12. Data Access Layer

Program to an Interface; Not
Implementation

13. Program to an Interface; Not Implementation

Three Tier Architecture
: ViewCourseHandler
: Course
: DBFacade
: Admin
getCourseDescription(courseID)
create(courseID)
getFromDB()
get(courseID, course)
getCourseDescription()
course description
UI
Business Logic
Persistent Data
English     Русский Правила