Edit me

Code Structure

Please see Coding Style for general coding approach. Here refers to code structure on a higher architectural-level.

Repositories

The Anchor platform is spread across many library components bundled together into source repositories.

  • Java repositories (containing the bulk of the codebase).
  • BeanXML repositories with projects, pipelines and tasks.
  • Various other supporting smaller projects (website, plotting and machine-learning scripts).

Modules

Each Java source repository is sub-divided into several modules, typically each producing a JAR. Each module is sub-divided into packages, with a naming chosen to reflect the module.

Plugins

Anchor makes heavy use of the Dependency Inversion principle from SOLID.

This means we use a lot of abstract base classes in the anchor application, which other classes rely on but the concrete implementations are only specified at run-time.

This run-time specification occurs via one type of module called a plugin, which can be easily exchanged / extended / modified without recompiling the main code-base.

We insert plugins using Dependency Injection via BeanXML (giving us Inversion of Control).

Anchor Beans

Many classes (especially plugins) inherit from AnchorBean class. This makes the class an Anchor Bean, which can be instantiated from XML and has other convenient properties.

Key entry-point modules

Some particular modules to take note of (all found in the anchor-assembly repository):

Tags: architecture