# Components and Versions

## The difference between COMP and PACK

While COMP refers to components as such, does PACK refer to an immutable package of components (*PackagedComponent*).

The COMP commands start with a *main component* (the one that listed in the command line), and it works with a the [component hierarchy](https://boomi.markusschmidt.pro/boomi-console/help-text/component-hierarchy). A component hierarchy (one main component and its *dependent* children) always references unversioned children because references in general do not include a version. This is always true, no matter if the main component is the *current* or a specific version.

The PACK command works with a *packaged component* which lists component incl. their version. There is no child or parent, neither are there referenced components.

### Thoughts on COMP

* No matter if *RenderCurrent* or *RenderVersioned*, only the main component contains a version.
* Only current components - unversioned children - are referenced.
* Versioned components are only necessary for documentation purpose, in case someone wants to document all versions.
* There is no need to build summaries etc. for versioned components. You must always select a specific versioned component.
* Versioned components stand for themselves - in any case - because they are never referenced.
* Versioned processes build a markdown and UML (with links to their unversioned children).
  * Rendered components (e.g. Markdown or UML) are the same for versioned and current component, if the version = current. There is no need to re-render a version component but to save the rendered content to another file (with a version tag).
* **RenderCurrent**\
  renders the current component with references to unversioned child components.
* **RenderVersioned**\
  renders a versioned main component with references to unversioned child components.
* Children must always include *deleted* components, too, because a non-current, versioned component might reference child components which have been delete

### What is built?

* No matter if the main component is specified with or without a version: Metadata, Component (GET Command) and Markdown and UML (DOC Command) are always saved as a file without version tag.
  * All children are also saved without version tags.
* A copy of all files (main and children) are save with a version tag in the version folder (see [application-settings](https://boomi.markusschmidt.pro/boomi-console/library/configuration-files/application-settings "mention")).
