pmMDA.NET

PmMda.Net.Dog.Reference Namespace

[This is preliminary documentation and subject to change.]

Reference codes

Introduction

A reference code is an enumeration of values defining a domain relevant type and its legal values. For example the set of currencies defined in the related ISO standard is a reference code. Each code is identified by the type it belongs to – represented as a C# class derived from IReferenceCode - and a unique code identifier. Reference codes can have a hierarchical structure. For example the department structure of a worldwide company can be represented through a hierarchical reference code.

The framework knows the concept of reference code and uses the reference code manager to access values of codes. The implementation of the framework never stores reference code objects or send them over the wire. Only the identifier of the code is stored or transmitted. Reference code objects are always transient ones. The mapping to the type is done implicitly.

The database definition connects the identifier of the code to the reference code table. Therefore persistent properties can only contain persistent reference codes. Technically, codes are mapped to 1-0..1 or 1-1 relationships.

The transformer factory knows the dependency between identifier and type. The name of the identifier is hard coded in the transformation routines. This approach is congruent with the concept of a reference code being a typed business enumeration.

Transient reference codes are build in the application logic and are not part of the data object graph framework.

The framework provides services to transfer reference codes from the server to clients. Incremental updates are available to minimize network overhead.

Design diagram

PmMda.Net.Dog.Reference diagram

Namespace hierarchy

Classes

ClassDescription
BooleanCode The boolean reference code implements boolean values (true, false) as business code.
FileReferenceCodeRetriever The file reference code retriever provides mechanisms to save and retrieve reference code values of a type from a serialized file representation.
HierarchicalReferenceCodeImpl The class provides a default implementation for the hierarchical reference code interface.
LocalReferenceCodeRetriever The local reference code retriever manages a set of reference codes defined in the program.
ReferenceCodeFactory The reference code factory creates all the codes available in an application.
ReferenceCodeImpl The canonical implementation of data reference code.
ReferenceCodeInfo The reference code information defines the capabilities of a reference code type.
ReferenceCodeMgrImpl Implements a canonical form of the reference code manager interface.

Interfaces

InterfaceDescription
IHierarchicalReferenceCode The hierarchical reference code defines the interface for all hierarchical key code of the application.
IReferenceCode The reference code defines the interface for all regular key code of the application.
IReferenceCodeMgr The reference code manager handles a set of reference codes either directly or through another reference code manager.
IReferenceCodeRetriever The reference code retriever provides an interface to retrieve reference code descriptors and code values from various sources.