CSC/ECE 517 Fall 2010/ch6 6h cb

From Expertiza_Wiki
Revision as of 02:40, 18 November 2010 by Cbbarefo (talk | contribs)
Jump to navigation Jump to search

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?

There are primarily two development structures that Domain Models are used. Domain Driven Development Feature Driven Development

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

References

  1. Domain Model - Wikipedia
  2. [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)