Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

A bindable domain object is a domain object
that also exposes the IBusinessObject interface.
(If you don't know what this means, read
Domain object vs. business object first.)

Thus a bindable domain object has two useful
traits:

  • re-store can persist it
  • re-bind can automatically render controls for each
    of the domain object's properties

The obvious route to implement such a hybrid is
multiple inheritance, but the bindable domain object
is one of several cases where mixin technology is
used.

re-motion's default implementation of the IBusinessObject
interface is a class aptly named BusinessObject. This
class is "mixed" to DomainObject by attributing the
DomainObject class with the BindableObjectBaseClassAttribute,
which specifies which class to mix in to give the DomainObject
class the IBusinessObject interface.

The BindableDomainObject class

re-bind's BindableDomainObject class exposes an
IBusinessObject interface and is based on DomainObject.
You will probably use this class a lot. However, it should
be noted, that you could write your own implementation
for the IBusinessObject interface and mix YOUR IBusinessObject
interface with DomainObject to arrive at a class
MyBindableDomainObject. You don't depend on re-bind's
BindableDomainObject. The method of mixins are explained
in Fabian Schmied's blog: http://www.re-motion.org/blogs/mix/category/11.aspx.

  • No labels