Concepts
The building blocks of Arciphant — modules, components, templates and bundles.
Arciphant describes a build as a set of modules that are made up of components; templates describe the component structure that modules share. This page defines these terms as they are used throughout the documentation. See Declare Structure for how to work with them in the DSL.
Module
A module is a vertical slice of your application — typically a domain or bounded context such as accounting or
certificate. Arciphant knows three kinds of modules:
- A domain module (declared with
module(...)) contains the business functionality of one domain. - A library module (declared with
library(...)) contains shared code that all domain modules may use. Each component of each domain module automatically gets anapidependency on the same-named component of the library module — see Shared code. - A bundle module (declared with
bundle(...)) assembles functional modulesFunctional moduleDomain and library modules — modules that consist of components. into a deployable application. It depends on the modules it includes and has no components of its own — see Bundle modules.
Domain and library modules are collectively called functional modules: modules that consist of components.
Component
A component is a technical building block inside a functional module — one layer or ring of your architecture style,
such as domain, application, web or db. Components declare dependencies on other components of the same module,
either as implementation or as api dependencies — see
Dependency types.
How a component is realized in Gradle depends on the component layout: as a separate Gradle project (project layout, the default) or as source sets inside the module’s Gradle project (source set layout).
Template
A template defines a reusable technical structure — a set of components and their dependencies — that modules are instantiated from. Templates can extend other templates, modules can combine multiple templates and additionally create or extend individual components. Templates are what keeps the module structure consistent across the code base and makes introducing a new module a one-liner.
Metamodel
The following diagram shows how these concepts relate: