Within the documentation and tutorials several terms are used. This section clarifies these terms and the relationship among them.
A plugin is a Git repository containing multiple source code files (TypeScript, Python, SCSS). It is an independent unit that can be compiled and tested. A plugin usually depends on other plugins, for example the TDP core plugin.
TypeScript / Python file
SASS/SCSS is a language on top of CSS for styling HTML. Similar to TypeScript, every valid CSS clause is a valid SCSS clause. In addition, several features are added that simplifies the creation.
An application is a special kind of plugin which provides a complete web application to the user. Applications are the end point to the user within the TDP platform and Phovea.
Examples: Ordino, Dashboard
Extension, Extension Point, and Registry
The core of Phovea and TDP is an flexible extension mechanism that allows plugin to register extensions to certain extension points. Other plugins can query the registry for all registered extensions of a given extension point. For example, the main extension point of TDP is “tdpView”. Plugins can register additional views using this extension point which are automatically listed in application without changing the application code itself.
Both concepts exists in frontend and backend side. Frontend extensions are registered within the “phovea.js” file. Backend extensions are registered within the “init.py” file of the plugin module. The Phovea Yeoman generator is a utility tool that helps developer to add extensions.
Examples: tdpView -> DummyView
A product is a composition of plugins to a buildable unit of docker containers. Due to the flexible extension mechanism the actual set of plugins can be configured during build time. This allows to create different product configurations for different customers and usage scenarios. For example, one product of the Dashboard application may focus on the genes while the other on exploring tissues only. Through the extension mechanism the same Dashboard application can be used with modifications. The main configuration file is “phovea_product.json” that is listing all plugins this product is composed of. In addition, build scripts for diverse Continuous Integration environments are included that allow to build Docker containers out of product configuration.
Examples: Ordino Product
The deployable unit of Phovea and TDP applications are Docker containers. Usually two docker container are forming a product. A frontend web Docker container hosting the compiled and optimized web application and a backend python Docker container hosting the Python backend. In addition, supporting docker containers are part of a deployment such as databases including MongoDB and Redis.
Developing a project consisting of multiple plugins can be challenging to manage. A workspace is a folder on a developer machine containing several cloned plugins that are managed at once. Utility functions from the Phovea Yeoman generator simplify the creation and management of a workspace, for example by creating a workspace based on an existing product. In this case, each plugin of which is product is composed is cloned and locally prepared for development. Unless only a specific plugin is programmed it is highly recommended to use a workspace for the project. See also the tutorial on setting up a workspace: How to create a workspace