Is it useful to make the Data Access Layer a separate layer from the service level

I have a question about the architecture I'm working with.

we have a backend restful service, a data layer (which is implemented by python eve, as well as a relaxation service) and a database. The data (access) layer itself is an independent emergency api.

In our backend service application, we have a customized e-python repository that makes calls to the data (access) level, and then the data level will request everything that is caused by a call from the database.

The reason that it is separated is because we want to isolate the data logic (query logic) from our business logic (backend service).

The cost is obvious, one more level, one more round of input-output for each request.

Can someone with experience in architecture say that this separate level of data access is good practice or not and why?

+4
source share
2 answers

Considering the architecture you are talking about, your project should be large enough to justify the cost of its development. For small projects, this architecture will be excessive.

Assuming your project is big enough, yes; It is always convenient to separate the DAL, BLL and Application levels. Refer to this and this .

The advantage is pure separation, which improves understanding, given that you control every part and reduce maintenance costs.

, , ( , -). ; . ; .

. , - . , . ; . - , . , - , .

. unit test . - , .. .

+5

, , . , , IPC, , , , , ( ). IPC , . , API , . , .

, , : . , . , . , MySQL Cassandra Hadoop, DAA ( ), . .

, ( ) ( , ). , , . , , - , , , .

0

Source: https://habr.com/ru/post/1671644/


All Articles