Skip to content

Commit

Permalink
GitBook: [master] 20 pages modified
Browse files Browse the repository at this point in the history
  • Loading branch information
mynkow authored and gitbook-bot committed Oct 1, 2020
1 parent e2a03ea commit 7026f5d
Show file tree
Hide file tree
Showing 19 changed files with 102 additions and 34 deletions.
8 changes: 6 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Initial page
# Introduction

Welcome to the Cronus Manual!

Cronus provides the Cronus Framework to help build applications centered on three core concepts - CQRS \(Command Query Responsibility Segregation\) / Event Sourcing and DDD \(Domain Driven Design\).

While many types of applications can be built using Cronus, it has proven to be very popular for microservices architectures. Cronus provides an innovative and powerful way of sensibly evolving to event-driven microservices within a microservices architecture.


Usually you do not need a CQRS framework to develop greate apps. However, we noticed a common infrastructure code written with every applicaiton. We started to abstract and move that code to github. The key aspect was that even with a framework you still have full control and flexibility over the application code.

29 changes: 24 additions & 5 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,27 @@
# Table of contents

* [Initial page](README.md)
* [Configuration](configuration.md)
* [Introduction](introduction.md)
* [Index](index.md)
* [test](test.md)
* [Introduction](README.md)

## Cronus Framework

* [Domain Modeling](cronus-framework/domain-modeling.md)
* [Workflows](cronus-framework/workflows.md)
* [Event Store](cronus-framework/event-store.md)
* [Messaging](cronus-framework/messaging.md)
* [Configuration](cronus-framework/configuration.md)

## Message Types

* [Commands](message-types/commands.md)
* [Events](message-types/events.md)
* [Signals](message-types/signals.md)

## Message Handlers

* [Application Services](message-handlers/application-services.md)
* [Projections](message-handlers/projections.md)
* [Sagas](message-handlers/sagas.md)
* [Ports](message-handlers/ports.md)
* [Gateways](message-handlers/gateways.md)
* [Triggers](message-handlers/triggers.md)

File renamed without changes.
2 changes: 2 additions & 0 deletions docs/cronus-framework/domain-modeling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Domain Modeling

2 changes: 2 additions & 0 deletions docs/cronus-framework/event-store.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Event Store

2 changes: 2 additions & 0 deletions docs/cronus-framework/messaging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Messaging

2 changes: 2 additions & 0 deletions docs/cronus-framework/workflows.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Workflows

4 changes: 0 additions & 4 deletions docs/index.md

This file was deleted.

19 changes: 0 additions & 19 deletions docs/introduction.md

This file was deleted.

2 changes: 2 additions & 0 deletions docs/message-handlers/application-services.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Application Services

2 changes: 2 additions & 0 deletions docs/message-handlers/gateways.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Gateways

2 changes: 2 additions & 0 deletions docs/message-handlers/ports.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ports

2 changes: 2 additions & 0 deletions docs/message-handlers/projections.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Projections

2 changes: 2 additions & 0 deletions docs/message-handlers/sagas.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Sagas

2 changes: 2 additions & 0 deletions docs/message-handlers/triggers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Triggers

48 changes: 48 additions & 0 deletions docs/message-types/commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Commands

A command is used to dispatch domain model changes. It can be accepted or rejected depending on the domain model invariants.

| Triggered by | Description |
| :---: | :--- |
| UI | It is NOT common practice to send commands directly from the UI. Usually the UI communicates with web APIs. |
| API | APIs sit in the middle between UI and Server translating web requests into commands |
| External System | It is NOT common practice to send commands directly from the External System. Usually the External System communicates with web APIs. |
| Port | Ports are a simple way for an aggregate root to communicate with another aggregate root. |
| Saga | Sagas are a simple way for an aggregate root to do complex communication with other aggregate roots. |

{% hint style="success" %}
**You can/should/must...**

* a command must be immutable
* a command must clearly state a business intent with a name in imperative form
* a command can be rejected due to domain validation, error or other reason
* a command must update only one AggregateRoot
{% endhint %}

```csharp
public class DeactivateAccount : ICommand
{
DeactivateAccount() {}
public DeactivateAccount(AccountId id, Reason reason)
{
Id = id;
Reason = reason;
}

public AccountId Id { get; private set; }
public Reason ReasonToDeactivate { get; private set; }
}

[DataContract(Name = "24c59143-b95e-4fd6-8bbf-8d5efffe3185")]
public class AccountId : StringTenantId
{
protected AccountId() { }
public AccountId(string id, string tenant) : base(id, "account", tenant) { }
public AccountId(IUrn urn) : base(urn, "account") { }
}

public class Reason : ValueObject<Reason>{...}
```



2 changes: 2 additions & 0 deletions docs/message-types/events.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Events

2 changes: 2 additions & 0 deletions docs/message-types/signals.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Signals

4 changes: 0 additions & 4 deletions docs/test.md

This file was deleted.

0 comments on commit 7026f5d

Please sign in to comment.