STK Components makes use of a number of architectural patterns. The following topics discuss some of these patterns in detail:
STK Components 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.
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.
Some STK Components 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.
STK Components 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.
Because STK Components 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.
STK Components uses a type of object called a Delegate as a conventional way to provide callback objects to certain Components subsystems.
Because STK Components 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 to achieve the same effect.