Thoughts on ORM and the like

Wednesday, January 12, 2005

To inherit or not to inherit?

The first question that arises when a developer starts to create the business entities is whether to have a base class for all of them, or to implement a "domain object" interface (usually defined by the ORM framework). In Easy Projects .NET we follow a combined approach.

Mirrorm provides both the "domain object" interface, IDomainObject, and a base class, PersistentObjectBase. The base class provides ways for caching and retrieving 1-to-n references.

In EP.NET we feature a base class, Entity, which inherits from PersistentObject, and implements IDomainObject, because virtually all entities have the same implementation. It is the parent class for projects, tasks, bugs, requests, and all the rest.

0 Comments:

Post a Comment

<< Home