All Projects → linux-china → Ddd Base

linux-china / Ddd Base

DDD(Domain Driven Design) base package for java

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Ddd Base

Rom
Data mapping and persistence toolkit for Ruby
Stars: ✭ 1,959 (+841.83%)
Mutual labels:  ddd
Symfony Ddd Wishlist
Wishlist, a sample application on Symfony 3 and Vue.js built with DDD in mind
Stars: ✭ 172 (-17.31%)
Mutual labels:  ddd
Eventstormingworkshop
EventStorming workshop, this is a hands-on workshop. Contains such topics: DDD, Event storming, Specification by example. Including the AWS product : Serverless Lambda , DynamoDB, Fargate, CloudWatch.
Stars: ✭ 184 (-11.54%)
Mutual labels:  ddd
Revo
Event Sourcing, CQRS and DDD framework for C#/.NET Core.
Stars: ✭ 162 (-22.12%)
Mutual labels:  ddd
Spring Boot Axon Sample
Sample application using Spring Boot, Axon, AngularJS and Websockets
Stars: ✭ 169 (-18.75%)
Mutual labels:  ddd
Spring Data Jpa
Simplifies the development of creating a JPA-based data access layer.
Stars: ✭ 2,238 (+975.96%)
Mutual labels:  ddd
Event Sourcing Jambo
An Hexagonal Architecture with DDD + Aggregates + Event Sourcing using .NET Core, Kafka e MongoDB (Blog Engine)
Stars: ✭ 159 (-23.56%)
Mutual labels:  ddd
Migration
《系统重构与迁移指南》手把手教你分析、评估现有系统、制定重构策略、探索可行重构方案、搭建测试防护网、进行系统架构重构、服务架构重构、模块重构、代码重构、数据库重构、重构后的架构守护
Stars: ✭ 2,753 (+1223.56%)
Mutual labels:  ddd
Viennanet
Framework for quickly creating enterprise microservices on .NET Core https://habr.com/ru/company/raiffeisenbank/blog/516540/
Stars: ✭ 170 (-18.27%)
Mutual labels:  ddd
Messagebus
A MessageBus (CommandBus, EventBus and QueryBus) implementation in PHP7
Stars: ✭ 178 (-14.42%)
Mutual labels:  ddd
Message Bus
Go simple async message bus
Stars: ✭ 166 (-20.19%)
Mutual labels:  ddd
Architecture
.NET 6, ASP.NET Core 6, Entity Framework Core 6, C# 10, Angular 13, Clean Code, SOLID, DDD.
Stars: ✭ 2,285 (+998.56%)
Mutual labels:  ddd
Software Engineer Interview Questions
A lot of questions and links to prepare yourself for an interview.
Stars: ✭ 176 (-15.38%)
Mutual labels:  ddd
Qframework
Unity3D System Design Architecture
Stars: ✭ 2,326 (+1018.27%)
Mutual labels:  ddd
Exop
Elixir library that provides a macros which allow you to encapsulate business logic and validate incoming parameters with predefined contract.
Stars: ✭ 185 (-11.06%)
Mutual labels:  ddd
Stove
Domain Driven Design oriented application framework, meets CRUD needs
Stars: ✭ 160 (-23.08%)
Mutual labels:  ddd
Ddd Laravel Sample
A Laravel DDD sample application using CQRS and persisting entities serialized without ORM
Stars: ✭ 172 (-17.31%)
Mutual labels:  ddd
Library
This is a project of a library, driven by real business requirements. We use techniques strongly connected with Domain Driven Design, Behavior-Driven Development, Event Storming, User Story Mapping.
Stars: ✭ 2,685 (+1190.87%)
Mutual labels:  ddd
Ddd Java
Spring Boot + Java [ DDD Sample ]
Stars: ✭ 191 (-8.17%)
Mutual labels:  ddd
Kreta
Modern project management solution
Stars: ✭ 177 (-14.9%)
Mutual labels:  ddd

DDD Base

"Building Status"

Domain Driven Design base package for Java.

How to use it in Java?

Please refer https://jitpack.io/#linux-china/ddd-base/1.1.1

Features

  • Annotations
  • Base classes for entity, domain event etc
  • Domain event: follow CloudEvents specification and CloudEvent convert support
  • DDD Reactive: https://www.reactive-streams.org/

Components

  • Data: Entity, VO and Aggregate
  • Behaviour: Repository, Service, Factory and Specification
  • Event: Follow CloudEvents spec
  • Infrastructure
  • CQRS interfaces for command & query

Reactive

DDD + Reactive(RSocket) to make context map easy.

Code Structure

Please visit src/test/java for code structure

If you use Kotlin to develop application, the structure will be different, please add entity, vo and repository in the same kt file.

Events

Please extend DomainEvent or DomainEventBuilder, then use ApplicationEventPublisher to publish the event. please refer https://spring.io/blog/2015/02/11/better-application-events-in-spring-framework-4-2

Attention: Spring framework 5.2 will add reactive support: https://github.com/spring-projects/spring-framework/issues/21831

Event extensions(JavaScript Object):

  • Distributed Tracing extension(traceparent, tracestate): embeds context from Distributed Tracing so that distributed systems can include traces that span an event-driven system.
  • Dataref(dataref): reference another location where this information is stored
  • Partitioning(partitionkey): This extension defines an attribute for use by message brokers and their clients that support partitioning of events, typically for the purpose of scaling.
  • Sequence(sequence): describe the position of an event in the ordered sequence of events produced by a unique event source
  • Sampling(sampledrate): Sampling
  • Multi-tenant(tenantId): Multi-tenant system support

CloudEvents JSONSchema: https://github.com/cloudevents/spec/blob/v0.3/spec.json

How to create event class

  • Extend CloudEvent class:
public class LoginEvent extends CloudEvent<String> {

    public LoginEvent(String email, String ip) {
        setData(email);
        setContentType("text/plain");
        setExtension("ip", ip);
    }
}
  • Create an event directly
CloudEvent<String> loginEvent = new CloudEvent<String>("text/plain", "[email protected]");
  • Event Builder or reactive processor
CloudEvent<String> loginEvent = CloudEventBuilder.<String>newInstance().contentType("text/plain").data("[email protected]").build();

ObjectMapper

  • ObjectMapper creation
ObjectMapper objectMapper = new ObjectMapper();
objectMapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
objectMapper.enable(SerializationFeature.INDENT_OUTPUT);
  • write as String
objectMapper.writeValueAsString(loginEvent);
  • read from json text
objectMapper.readValue(jsonText, new TypeReference<CloudEvent<String>>() {});

References

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].