Essentials Architecture

Domain-Driven Design itself can be successfully applied in variety of software architectural styles. Some are very broad and tend to define every aspect of the system, others are more focused and try to address a specific demand. The business framework itself can adapt to several architectural styles. This documentation will focus on the traditional layered architecture from the Eric Evans DDD book, improved by the usage of the Dependency Inversion Principle.

Essentials Architecture

SeedStack is an integration solution, bringing together the best open-source libraries in a clean and consistent architecture. To do so, it relies on an extensible kernel/plugin architecture that is capable of automatically activating the plugins present in the classpath. An integration stack Modern microservices and applications are composed of a great number of software components and technologies that must be integrated with each other. Things like REST resources, persistence, business logic, caching and so on must be all initialized, configured and wired properly to make a system operational.

Essentials Configuration

SeedStack provides a simple and powerful configuration system. Configuration can be read from multiple sources and in multiple formats. The recommended way to specify configuration is a YAML file named application.yaml located at the root of the classpath.

Essentials Dependency injection

In a Seed application, the dependency injection is provided by a Guice injector, created by the kernel in its starting phase. The injector is configured in explicit mode, meaning that all the application injection points are checked during application startup and must be resolvable. This mode ensures that injection errors are detected as soon as possible in the development process. Although Guice is operating behind the scenes, it is invisible for the application which only needs to rely on JSR 330 annotations for defining injection points.

Essentials Distribution

SeedStack is distributed as a collection of software components that can be composed together as needed. To ensure that you get a coherent, well-tested set of components, they are packaged in the SeedStack distribution. It is a special Maven POM file (BOM) that you reference in your own project to import SeedStack dependency management rules.

Essentials Domain-Driven Design basics

Domain-Driven Design (DDD) is an approach to the development of software that: Focuses on the core domain. Explores models in a creative collaboration between business experts and the software team. Defines an ubiquitous language within an explicitly bounded context. Domain-Driven Design has two sides, both equally important: Strategic design, which address high-level considerations of domain knowledge and its modeling. Tactical design, which propose practical patterns to design the required software.

Essentials Error diagnostic

When something goes wrong, SeedStack does its best to provide detailed information about the failure. This can take two forms: the detailed exception system and the diagnostic dump. Detailed exception system All SeedStack exceptions extend BaseException which is a RuntimeException. This means that you are not required to catch framework exceptions although you can do so if needed. All SeedStack exceptions display a detailed information report about the failure. Consider this example:

Essentials

SeedStack Java framework, also simply known as «Seed», is the foundation enabling you to build Java applications or microservices easily and efficiently.

Essentials Logging

Logging is a necessity in almost any application. SeedStack standardize logging through the popular SLF4J logging facade but the actual implementation is chosen at the project level. Recommended implementation SeedStack is compatible with any SLF4J implementation but we recommend Logback as an efficient, natural fit for SLF4J. To add Logback to your project, use the following dependency snippet: Maven Gradle <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId><version>1.2.3</version> </dependency> Specifying versions manually is error-prone, use the distribution instead.

Essentials Package layout

We recommend a well-defined package layout for organizing your business code according to the software architecture described above. The domain The root package for the domain layer is: [base.package].domain The domain can be composed of several sub-domains that can be specified as sub-packages: [base.package].domain.subdomain1 [base.package].domain.subdomain2 ... The domain package (or each sub-domain package if relevant) contains: A model package containing aggregates, each in its own package. An aggregate package contains The aggregate root along with other related entities and value objects, The factory interface if any, The repository interface if any, The aggregate policies if any.

Manual Qualified injection

With the business framework, much like the rest of SeedStack, you declare injection points with an interface type not an implementation one. The framework discovers any implementation of a specific interface and will inject it through its interface. For a specific interface, the business framework supports multiple implementations. This is particularly useful when you have multiple algorithms of implementation technologies for an interface. If multiple implementations of a specific interface are found, you must use a qualifier on each one to differentiate them.

Essentials Reference material and books

To go beyond what is described in this documentation, we recommend a few books which will help you to better understand DDD, independently of the business framework. Domain-Driven Design community This is a major online resource about Domain-Driven Design with a lot of contents to discover and learn about it. Online community Eric Evans: Domain-Driven Design Reference This book by Eric Evans is a summary of patterns and definitions of Domain-Driven Design.

Essentials Requirements

SeedStack is designed to work equally well and provide the same level of features in a standalone environment or in managed environment like a Servlet container or a JEE application server.

Essentials

SeedStack is a Java-based, high-productivity development solution. It can be used to build different types of software like REST microservices, classic Web applications or command-line applications. What is SeedStack ? The Java framework is the foundation. It can be completed with: With the business framework to write clean business code, With add-ons from the official library, With third-party or custom add-ons. SeedStack is built upon carefully selected and integrated open-source components.

15 element(s)

Filter