The Bench system consists of a file system layout, binaries for Core Library, Command Line Interface, and Dashboard, a couple of PowerShell/CMD scripts, the app libraries, and the configuration. Since the architecture is constantly evolving until Bench hits the version 1.0 this article contains only a brief description of the current state.
- File System Layout
- Bench Core Binary
- Command Line Interface
- Bench Dashboard
- Power-Shell Scripts
- CMD Scripts
- App Libraries
- Configuration Levels
File System Layout
Bench uses a file system layout with three folder groups. For a detailed description of the file structure see: File Structure Reference.
The first group contains binaries, scripts and resources of the Bench system itself. This group is replaced in case of an upgrade.
User Configuration and Data
The second group contains the user configuration and user data. This group is not changed by any Bench operation like upgrade, app installation, or app removal.
Temporary Files and App Resources
And the third group contains the installed apps and temporary data. This group can be deleted without any actual data loss, because it is rebuild by Bench during the app installation automatically.
Bench Core Binary
The most logic in the Bench system is implemented in the
wich is also called the Bench Core binary.
It is a Microsoft .NET assembly with a public API.
It supports loading the different layers of the
Bench configuration, downloading, installing, updating,
and removing apps according to the loaded configuration.
Command Line Interface
Bench provides a command line interface via the
It allows to manage and interact with the Bench environment.
The Bench CLI depends on the Bench Core.
The dashboard is a program with a graphical user interface which makes the various features of the Bench system available in a mouse-friendly way. The Bench Dashboard depends on the Bench Core.
Some features are implemented by PowerShell scripts.
They load the
BenchLib.dll and call its public methods.
Two important features, implemented by PowerShell scripts, are the
In both cases, an execution proxy in
Run-Adorned.ps1 to execute pre- and post-execution scripts.
The registry isolation is implemented as a couple of functions in
There are three CMD batch scripts for launching
a shell in the Bench environment:
These scripts depend on the
env.cmd in the Bench root directory
for loading the environment variables.
The knowledge about app resources and thier installation strategy is stored in app libraries. An app library contains an index with the app properties and optionally PowerShell scripts for customization of setup steps and execution adornment.
App libraries are hosted independently and are referenced in the Bench configuration. The user configuration is also an app library. It is called the user app library, and contains app descriptions written by the user.
Bench supports three levels of configuration:
- The default configuration, which comes with the Bench installation and should not be edited.
- The user configuration, which can be versioned and shared via Git.
- And the site configuration, which can be stored outside of the Bench environment and can take influence on multiple Bench environments.