Skip to content

Modules

Backend Core is published as a multi-module Maven project. Each module maps to one slice of the architecture described in Architecture:

Module Purpose Layer
backend-core-model Interfaces and DTOs shared across all layers. Model
backend-core-data Persistence-layer contracts (no JPA / no persistence provider). Persistence (contracts)
backend-core-data-impl JPA-based implementation of the persistence contracts. Persistence (impl)
backend-core-business Service-layer contracts. Service (contracts)
backend-core-business-impl Default implementation of the service contracts. Service (impl)
backend-core-business-spring-impl Spring-based implementation of the service contracts. Service (impl)

Picking the modules you need

Most consumers do not depend on every module. As a rough guide:

  • Application written in a single module — depend on backend-core-model, backend-core-data-impl, and one of the backend-core-business-*-impl modules. The contract modules come in as transitive dependencies.
  • Application with strict layer separation — split into multiple modules (or repositories). The presentation module depends only on backend-core-business. The service-impl module depends on backend-core-business, backend-core-data, and backend-core-model. The persistence-impl module depends on backend-core-data and backend-core-data-impl.

Module reference

backend-core-model

Contains the interfaces that represent domain objects shared across all layers, and DTOs used to move data between them. Persistent entities are referenced through interfaces in this module so that persistence-specific metadata does not leak to consumers.

This module contains no technology-specific code — it can be depended on safely from any layer, including presentation.

Detailed API reference to be populated. For now, browse the backend-core-model source.

backend-core-data

The contracts for the persistence layer. Consumers depending on this module do not transitively import JPA or any persistence provider — that is the point.

Detailed API reference to be populated. For now, browse the backend-core-data source.

backend-core-data-impl

The JPA-based implementation of the persistence contracts. Brings JPA in as a transitive dependency, but stays neutral with respect to the persistence provider (Hibernate, EclipseLink, etc.) — the provider is selected by the consumer at runtime.

Detailed API reference to be populated. For now, browse the backend-core-data-impl source.

backend-core-business

The contracts for the service / business-logic layer. Depending on this module does not pull in the persistence contracts (so the presentation layer cannot accidentally see them).

Detailed API reference to be populated. For now, browse the backend-core-business source.

backend-core-business-impl

A default implementation of the service-layer contracts. Useful when you want service-layer behavior without committing to a specific dependency-injection framework.

Detailed API reference to be populated. For now, browse the backend-core-business-impl source.

backend-core-business-spring-impl

A Spring-based implementation of the service-layer contracts, intended for applications that already use Spring (Spring Boot or otherwise). It wires service beans through Spring and lets the service layer participate in Spring-managed transactions.

Detailed API reference to be populated. For now, browse the backend-core-business-spring-impl source.