The terms "business object" and "domain object" are mutually exchangeable in common understanding in enterprise computing. Note that wikipedia links to the same article for both terms:
In re-motion, these terms are related, but not mutually exchangeable. Important differences exist, and this page clarifies these differences and the precise meaning of each term.
Both business objects and domain objects are collections of properties, modelled after the real-world entities you want to manage with your application. For example, if you want to manage people with your re-motion application, you might want person objects. A toy person object can consist of these (typed) properties:
To this vague explanation all enterprise programmers can agree. What about the differences?
IBusinessObjectinterface, so that a binding layer can discover which properties constitute the (business object)
If we understand the Dr. Freud object listed above as a business object, we know that we can use the
IBusinessObject interface to initiate a dialog like this:
Q: Unknown object, what' your class?
Q: What properties constitute that class?
A: A first name, a surname, a title and a birth date.
Q: What are the values and types of those?
A: the first name is the string "Sigmund";
the surname is the string "Freud"; the title is the string "Doctor";
the birth-date is the date "1856-05-06".
After such a conversation, re-bind (or some other binding layer, that's the beauty of it) knows everything it needs to display all of Dr. Freud's values in a form or a list. That's the business object aspect of that instance, and it is most important for re-form.
If we understand the Dr. Freud object as a domain object, we can be sure that it can load and store itself from and to some database. That's the domain object aspect of that instance, and it is most important for re-store.
Aren't all domain objects business objects? What's the point of a business object that can't be persisted?
Note that re-store and re-bind are completely independent from each other.
"Search objects" expose an
IBusinessObject interface, but are never persisted. Like domain objects, they are sets of typed properties, but these properties are search terms, not components of objects you want to manage. If you have person objects in your application, it is a good idea to have person search objects as well:
This search object represents a query that gives you all Ph.D.s named Smith who are born before 1970. It exposes an
IBusinessObjectis useful for discovering typed properties
Conversely, domain objects DON'T expose an
IBusinessObject interface. If you want objects with persistence AND an
IBusinessObject interface, you must resort to bindable domain objects.
BindableDomainObject is the base class for all re-motion web applications, because they are domain objects (persistence) AND business objects (can be displayed by re-bind).
bindable domain object
domain object class