N-tier architecture design separation of interests

I understand that there are already a number of publications on n-level design, and this may be thoughtful and cool for me, but now I'm all confused and would like to get some clarity from the community please.

I am trying to separate the project that I created (and not very well designed for starters) into different layers (each in its own project):

  • interface
  • Business objects
  • Logic / Business
  • DAL

The user interface should only call the logical layer to get its material

Business objects should not call or refer to anything else, just be a way to store data

The Logic / BUSINESS level must contain all methods for creating, creating, updating, deleting (CRUD) objects in the system and links to both BO and DAL. It will apply the business logic to operations, and then delegate the actual CRUD to the DAL.

DAL will perform CRUD operations in the database. He will refer to BO as he will return them for Gets, etc.

My question is, should Logic classes only call their equivalent DAL class and instead just use boolean classes? In other words, a class CompanyLogicshould only call a class CompanyDAL. Therefore, if he wanted to get the Client object by ID, he would call ClientLogic.GetClientByID(int), not ClientDAL.GetClientByID(int).

The reason I thought I might need to stay on my own layer was this:

  • ,

  • , - (, , , ).

EDIT:

, , BUSINESS , ClientBULL CompnayBULL, . factory , , - . ?

+3
1

, :

  • - , , . , "" "" DAO ( ) "", - .

  • - DAL, DAL, DAL.

  • , . , ; -. , , , .

  • , , , , . , - , , . , , .

!

: , , . , , -. , ?

, YAGNI. , , / (DAL ).

+4

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


All Articles