http://blog.csdn.net/helloboat/article/details/51208128
A domain model is a visual representation of a conceptual or real-world object within a domain, also known as a conceptual model or an analytical object model, which focuses on analyzing the problem area itself, discovering important business domain concepts, and establishing relationships between business domain concepts. Anemia model refers to the use of domain objects only setter and Getter methods (POJO), all business logic is not included in the domain object but placed in the business logic layer. Some of the anemia models we're talking about are further divided into blood loss models (domain objects have no business logic at all) and anemia models (domain objects have a small amount of business logic), which we don't differentiate here. The congestion model places most of the business logic and persistence in the domain object, and the business logic (business façade) simply completes the processing of the encapsulation, transactions, and permissions of the business logic. The following two images show the layered architecture of the anemia model and the congestion model. Model of anemia model of congestive model of anemia the organization domain logic typically uses transactional scripting patterns, allowing each process to correspond to an action that the user may want to do, each driven by a process. That is, in the design of the business logic interface, each method corresponds to a user's operation, this mode has the following a few:
- It is a simple process model that most developers can understand (for the vast majority of developers in the country).
- It works well with a simple data access layer that uses row data portals or table data portals.
- The transaction boundary is obvious, a transaction begins at the beginning of the script, terminates at the end of the script, and easily implements declarative transactions through proxies (or facets).
Then, there are many drawbacks to the transactional scripting pattern, and as the complexity of the domain increases, the complexity of the system increases rapidly and the program structure becomes extremely chaotic.
What is a domain model? What is the difference between the anemic model (anaemic domain model) and the congestion model (rich domain models)?