Relational Interfaces Diagram



This diagram is intended to represent the current relationship and design for the interfaces which drive the Relational namespace. These are highly subject to change and the diagram may lag behind the code.

High Level Discussion

The Relational namespace contains classes which ultimately provide ORM functionality by providing a flexible and customizable way to map the target class(es) to any source of data, instantiate one or more instances initialized with the data, and register instances within some "globalized" container.

Class breakdowns fall within two primary roles:

Propagation Services

IBinder writes query results into one or more object instances. This can be single object instances or entire heirarchies depending upon the query data provided.

IPersistor takes existing instances and propagates the results back to the target data store. As before, this can be a single instance type or an entire hierarchy. IPersistor dynamically generates the persistance or populates parameters for existing methods/procedures.

Both make use of IRelationalMap, a collection of IAssignments and their IValidators which provide adequate information for data propagation between class definition and data schema.

Instance Management

BaseRegistry provides a centralized store for the relational maps and instances created using Nvigorate's ORM via a singleton pattern. While alternatives can be designed using the provided interfaces, I find that responsible use of this class simplifies and reduces the amount of code required.

IFactory becomes the single point of instantiation and handles registration, wire-up of new class instances and relational binding: a process whereby an instance's child/sibling relationships get populated dynamically. IFactory's job is to co-ordinate calls between the registry, IRelationalMap and IBinder.

IComplexKey is the combination of class properties whose combination of values make that instance unique from other instances. This provides a simple way to retrieve and differentiate instances when stored in the BaseRegistry or any other collection.

To Learn More:

Each Interface has one or more implementations within Nvigorate. The idea is not simply to provide a contract for me to design against, but to try and provide a contract for others to extend and improve with. Not only do the interfaces provide a simple way to abstract the intended interaction within the Relational subsystem, but they allow for a total customized implementation to hopefully avoid tying Nvigorate users to the original implementation.

Implementation Index











Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.