How to understand the layering in domain design, service coding, and the different treatments of the domain by each business.

Domain layer: Bottom layer: domain field + cruid: reusable, such as where to get the attribute, how to name the entity displayed to the user. Sink.

          Encapsulates database operations, encapsulates second-party dependent operations, and encapsulates third-party dependent operations (image upload, etc., file saving, synchronization to other modules and presentation).

Domain layer expansion:

                 The avatar also supports several different types of domain objects. For example: taxis, trucks. Meeting rooms, general meeting rooms, cloud meeting rooms. Different objects contain different fields.

                 See if your business pays attention to the meaning of these fields and whether there is verification. If there is no verification, then it will become an ext.

Business Layer:

           Reuse the most basic cruid for orchestration. You only need to pass the id.

          But the complexity: transform the cruid. Then you need to provide extension points at the bottom layer, or abstract method. Or provide strategy interface registration. Abstract is not flexible enough, after too many business domain objects, it will lead to too many inherited objects. Strategy classes are better. This is the extension point function of the business center.

 

 

Guess you like

Origin blog.csdn.net/fei33423/article/details/106663024