The ORM in NORM

Okay then, so what does Norman actually do?

Simplistically, it provides an engine for a developer to use in order to create objects, and restore and persist objects from and to a datastore. Metadata attributes on objects handled by the engine describe to the engine how it needs to be created and restored, and the engine does the rest.

I have used PostSharp to allow the objects to be as attribute driven as possible, in order to avoid as much boilerplate code as possible. My intention, of course, is to require NO boilerplate code at all to be used. I freely admit, however, that my knowledge of PostSharp is limited at present. My knowledge stretches far enough, however, to realise that I should replace my current tehnique to use CompundAspect, though as the code works as it stands, so this is not a high priority.

The two diagrams below show two of the three main functional responsibilities of the engine, the third being persistance, that shall be described later.

The engine itself has been designed as dumb.

It has no continuous knowledge of any of the objects, nor any knowledge of its relationships to other objects.Any knowledge it has is on a need to know basis, an reflected through attributes on the objects themselves.

This way the engine, if required, can traverse paths through the object model whilst having no implicit knowledge of the model at all.

The behaviour of the engine can be thought of as a cross between and IoC container and an ORM (remember, however, I am not claiming it is either of the two).