What is a domain model? What is the difference between the anemic model (anaemic domain model) and the congestion model (rich domain models)?

Source: Internet
Author: User

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:
  1. It is a simple process model that most developers can understand (for the vast majority of developers in the country).
  2. It works well with a simple data access layer that uses row data portals or table data portals.
  3. 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)?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.