CSC/ECE 517 Fall 2010/ch6 6h cb: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
==Introduction to Domain Object Models==
Introduction to Domain Object Models
Although they share the same initials, the Document Object Model discussed in the previous chapter and the Domain Object Model (DOM) discussed here have very little in common. Throughout the chapter I may abbreviate the Domain Object Model as DM (since it is also referred to as the Domain Model) so that it is not confused with the more common use of DOM as a Document Object Model. A Domain Model is a tool used to translate business logic into a visual representation which includes all relevant relationships and data. This visual aid can then be used to verify a problem domain or system architecture among both technical and non-technical contributors.
Although they share the same initials, the Document Object Model discussed in the previous chapter and the Domain Object Model (DOM) discussed here have very little in common. Throughout the chapter I may abbreviate the Domain Object Model as DM (since it is also referred to as the Domain Model) so that it is not confused with the more common use of DOM as a Document Object Model. A Domain Model is a tool used to translate business logic into a visual representation which includes all relevant relationships and data. This visual aid can then be used to verify a problem domain or system architecture among both technical and non-technical contributors.




==What defines a DM?==
What defines a DM?
To help define a Domain Model we’ll use the trite example of an online store which includes a shopping cart, items to purchase, a customer, etc. The DM for such an abstraction would look similar to the following
To help define a Domain Model we’ll use the trite example of an online store which includes a shopping cart, items to purchase, a customer, etc. The DM for such an abstraction would look similar to the following


Line 13: Line 13:
So thus far a DM may not seem very different from a UML diagram or database map diagram. However, what it can represent that the other two cannot is a process or series of events. So then beyond simply defining the relationships between objects, such as a shopping cart contains items, a DM can specify that a customer must add items to the shopping cart before being able to check out, for instance.
So thus far a DM may not seem very different from a UML diagram or database map diagram. However, what it can represent that the other two cannot is a process or series of events. So then beyond simply defining the relationships between objects, such as a shopping cart contains items, a DM can specify that a customer must add items to the shopping cart before being able to check out, for instance.


==When is it used?==
When is it used?
There are primarily two development structures that Domain Models are used.
The two primary development cycles that Domain Models are used are Domain Driven Development (DDD) and Feature Drive Development (FDD).  
Domain Driven Development
 
Feature Driven Development
DDD
The first, Domain Driven Development, concentrates on tackling complex problems by leaning on the expertise of the domain in which the problem exists. In this case a Domain Model can be very useful in determining if all parties in a project fully understand the domain and how each piece works together in the system. It is important, however, that all pieces of the DM be written in a “ubiquitous language” that is common among experts in the field.
 
FDD
Feature Driven Development, uses a very communicative relationship between developers and customers to iteratively develop and refine features requested by the customer. The DM is an important piece of each iteration of the cycle and is one of the first things that is agreed upon by both parties. As it works in DDD, the Domain Model serves as proof that both sides agree and understand the problem domain before any design or development work begins. This is especially important for complex systems.


==What advantages does it give? and how is it different from UML or a database model?==




==References==
==References==
#[http://en.wikipedia.org/wiki/Domain_model Domain Model - Wikipedia]
http://en.wikipedia.org/wiki/Domain_model
#[http://en.wikipedia.org/wiki/Feature_Driven_Development
http://en.wikipedia.org/wiki/Feature_Driven_Development
http://en.wikipedia.org/wiki/Domain-driven_design
http://en.wikipedia.org/wiki/Domain-driven_design
http://en.wikipedia.org/wiki/Anemic_Domain_Model
http://en.wikipedia.org/wiki/Anemic_Domain_Model
http://en.wikipedia.org/wiki/Business_object_(computer_science)
http://en.wikipedia.org/wiki/Business_object_(computer_science)
Patterns of Enterprise Application Architecture by Martin Fowler
Addison-Wesley Professional. November 5, 2002 pp 116-120

Revision as of 03:31, 18 November 2010

Introduction to Domain Object Models Although they share the same initials, the Document Object Model discussed in the previous chapter and the Domain Object Model (DOM) discussed here have very little in common. Throughout the chapter I may abbreviate the Domain Object Model as DM (since it is also referred to as the Domain Model) so that it is not confused with the more common use of DOM as a Document Object Model. A Domain Model is a tool used to translate business logic into a visual representation which includes all relevant relationships and data. This visual aid can then be used to verify a problem domain or system architecture among both technical and non-technical contributors.


What defines a DM? To help define a Domain Model we’ll use the trite example of an online store which includes a shopping cart, items to purchase, a customer, etc. The DM for such an abstraction would look similar to the following

…....insert diagram here.


At first glance, the structure of a DM looks very much like a flow diagram, UML diagram, or database map with slight variations on each of these. The big blocks in the diagram represent the Business Objects of the model. These objects typically represent real world objects and are modeled accordingly. For instance. the shopping cart in the example above is a business object. Each business object in a DM holds certain variables and attributes that pertain directly to that object. A shopping cart may contain a customer number, a list of items, and a total price. In addition to holding data, these objects can also perform operations. In fact, a domain model where objects do not contain any logic is called an Anemic Domain Model. Most objects, however, do contain business logic, such as an AddToCart method for the shopping cart object.

So thus far a DM may not seem very different from a UML diagram or database map diagram. However, what it can represent that the other two cannot is a process or series of events. So then beyond simply defining the relationships between objects, such as a shopping cart contains items, a DM can specify that a customer must add items to the shopping cart before being able to check out, for instance.

When is it used? The two primary development cycles that Domain Models are used are Domain Driven Development (DDD) and Feature Drive Development (FDD).

DDD The first, Domain Driven Development, concentrates on tackling complex problems by leaning on the expertise of the domain in which the problem exists. In this case a Domain Model can be very useful in determining if all parties in a project fully understand the domain and how each piece works together in the system. It is important, however, that all pieces of the DM be written in a “ubiquitous language” that is common among experts in the field.

FDD Feature Driven Development, uses a very communicative relationship between developers and customers to iteratively develop and refine features requested by the customer. The DM is an important piece of each iteration of the cycle and is one of the first things that is agreed upon by both parties. As it works in DDD, the Domain Model serves as proof that both sides agree and understand the problem domain before any design or development work begins. This is especially important for complex systems.


References

http://en.wikipedia.org/wiki/Domain_model http://en.wikipedia.org/wiki/Feature_Driven_Development http://en.wikipedia.org/wiki/Domain-driven_design http://en.wikipedia.org/wiki/Anemic_Domain_Model http://en.wikipedia.org/wiki/Business_object_(computer_science) Patterns of Enterprise Application Architecture by Martin Fowler Addison-Wesley Professional. November 5, 2002 pp 116-120