Engine Layer
The engine layer consists of all classes which are responsible for the actual computational work.
To allow interoperability between the different layers the interface guide lines must be followed.
To import data a typical engine implementation has a method (typically a constructor) which gets
an object of the input layer. It's up to the programmer whether the basic IInput Interface is used
as variable type or any sub-interface or class. It is recommended that the most specific interface
is used. This ensures that the object instances of the input layer which are passed to engine layer
have the correct functionality i.e. the desired methods implemented. Another benefit is that possible
incompatibilities can be detected during compilation time already.
Engines can be called in a row, piped or nested. Furthermore the engine results can be passed to
statistical tests or to visualization objects. Since it is impossible to define one data structure
which is capable of handling all result types and it is not intended to demand for an interface for
each kind of data result, two techniques are used: encapsulation and serialization. Each engine class
requires a method getResults() which returns an object reference of the type EngineResult. The
developer is now free to decide what and how to store the results in an EngineResult object. To
offer a comfortable way of interaction and usage, in currently available classes the data is stored
in a String, mostly in tabularized form. This allows to perform statistical tests, import and export
to and from files, spread sheet calculation programs or to browse through the returned results.
Additionally it is possible to allow public variables in your engine classes, or to pass complex data
structures completely serialized within objects. No matter which way is preferred the persistence of
the gained results and the desired interoperability of the layers should be achieved.