Classes and interfaces of a model component

Parent Previous Next

The following is an excerpt from "Approaching model implementation using the BioMA component-based architecture" (MODEXTREME, 2014).


The first classes to be defined are the Domain Classes, which contain the variables which specify the domain to be modelled. Such classes, which can be 1 or more, will be used as types in the signature of the unique model interface for the component. Consequently, once Domain Classes are defined, the Application Programming Interface Class can be defined, inheriting from IStrategy, but always adding the four methods of Figure 3. An interface, rather than an abstract class with abstract methods to be overridden, was chosen to maintain, in case needed, the capability for a Strategy to inherit from a class, being multiple inheritance not allowed in .NET languages.


Models algorithms are implemented in discrete units called strategies. Models are implemented as simple, composite, and context strategies. The Strategy and Composite design patterns are implemented, hence all types of strategies implement the same interface which inherits from IStrategy (Figure 2). A Model component may include simple strategies only, but it is much more frequent that it includes simple and composite strategies, which also allow organizing models hierarchically.



Figure 2. Class model of a component














































































































Created with the Personal Edition of HelpNDoc: Easy CHM and documentation editor