Click or drag to resize

Patterns

DME Component Libraries makes use of a number of architectural patterns. The following topics discuss some of these patterns in detail:

Topic

Description

Evaluators And Evaluator Groups

DME Component Libraries makes extensive use of an "evaluator pattern." Evaluators are created from definitional objects, which, instead of doing computations themselves, allow you to configure an object in the modeled world and then obtain an evaluator which can perform computations relating to it. Evaluator groups enable more efficient evaluation of evaluators by eliminating redundant computations.

Evaluator Parameterization

In some situations, not all inputs into your computations are known up-front. In these cases, it can be useful to design a system using placeholder objects, which are specially designed to allow the actual input values to be provided later when the evaluators are actually being evaluated. Parameterized evaluators extend the Evaluator concept to support functions that vary with respect to additional parameters.

Service Providers

Some DME Component Libraries classes work with an interface called IServiceProvider. Most notably, AccessConstraints expect their ConstrainedLink (get / set) or ConstrainedObject (get / set) properties to be specified as IServiceProvider instances. IServiceProvider allows you to obtain an object that implements a particular service from the service provider, where a service is simply another interface.

Multithreading

DME Component Libraries is designed for multithreading. Many of the operations it performs, such as propagating and computing Access, are automatically performed in parallel using multiple threads. This enables the library to take full advantage of modern multi-core processors. You can control the use of threads by changing properties of ThreadingPolicy.

Type Literals

Because DME Component Libraries was originally developed for the .NET Framework, some subsystems require runtime use of the types of generic parameters. However, since Java implements its generics using type erasure, this information is not available from the JVM itself, so this information must be stored in your application code directly.

Delegates

DME Component Libraries uses a type of object called a Delegate as a conventional way to provide callback objects to certain DME Component Libraries subsystems.

Out Parameters

Because DME Component Libraries was originally developed for the .NET Framework, some subsystems require the use of out parameters. Since this language feature is not available in Java, we use single-element arrays to achieve the same effect.