Constructing a custom application framework
There will be different requirements for different components, but typically, the properties and functionality that we build into our Data Model base classes will be utilized and made more useful by our other base classes, so let's start by looking at the various Data Model base classes first.
One thing that we need to decide is whether we want any of our Data Model base classes to be generic or not. The difference can be subtle, but important. Imagine that we want to add some basic undo functionality into a base class. One way that we can achieve this would be to add an object into the base class that represents the unedited version of the Data Model. In an ordinary base class, it would look like this:
private object originalState; public object OriginalState { get { return originalState; } private set { originalState = value; } }
In a generic base class, it would look like this:
public abstract class BaseSynchronizableDataModel...