How should my business logic interact with my data layer?

后端 未结 2 694
心在旅途
心在旅途 2020-12-30 15:34

So I\'m working on making a draft of my program.

This is my plan:

GUI
---
Business Logic
---
Data

You should be able to replace eit

2条回答
  •  旧时难觅i
    2020-12-30 15:48

    Your Data "Layer" should probably be more than a set of semantic queries and you should encapsulate it in an API, otherwise your Business Logic layer will have to know too much about the implementation of your Data layer. The same reasoning you have used between your GUI and Business Logic layers should apply, and for the same purpose.

提交回复
热议问题