-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e2a03ea
commit 7026f5d
Showing
19 changed files
with
102 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Domain Modeling | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Event Store | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Messaging | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Workflows | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Application Services | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Gateways | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Ports | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Projections | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Sagas | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Triggers | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>{...} | ||
``` | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Events | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Signals | ||
|
This file was deleted.
Oops, something went wrong.