Child pages
  • bindable domain object
Skip to end of metadata
Go to start of metadata

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-form 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-form'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 re-mix are explained in Fabian Schmied's blog.

  • No labels