Domain Element
Abstract
A concept from domain analysis is made into an element.
Problem
A concept in the domain needs to be recognized as a distinct unit of information when processing it.
Context
Every document has a domain, and every domain has unique concepts.
Forces
Data needs to be structured in order to be processed.
Solution
Concepts from the domain become elements in the document.
Examples
In a payroll processing system, Employees, Hourly Wage, and Hours Worked are all concepts from the domain. These can all be made into elements in a document type used for dealing with the payroll.
<Employee id="62537">
<HourlyWage>25.00</HourlyWage>
<HoursWorked>40</HoursWorked>
</Employee>
Discussion
Object Oriented Analysis and Entity-Relational DataBase modeling techniques are useful for finding domain concepts.
Granularity of object needs to be thought about. Too granular results in more markup and more processing, if elements are not granular enough, extra parsing needs to be done by the application.
Related Patterns
Known Uses
All document types are full of Domain Elements.
XHTML is used for markup of documents to be displayed so it contains elements for things such as titles, headings, and paragraphs.
The Information and Content Exchange (ICE) Protocol (http://www.icestandard.org/) is used for distributing web content, so it contains elements such as sender, receiver, request and response.