Skip to content

Commit

Permalink
GitBook: [master] 24 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 6144fc9 commit 44c6c8f
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

## Cronus Framework

* [Domain Modeling](cronus-framework/domain-modeling.md)
* [Domain Modeling](cronus-framework/domain-modeling/README.md)
* [Aggregate](cronus-framework/domain-modeling/aggregate.md)
* [Entity](cronus-framework/domain-modeling/entity.md)
* [Value Object](cronus-framework/domain-modeling/value-object.md)
* [Published Language](cronus-framework/domain-modeling/published-language.md)
* [Event Store](cronus-framework/event-store.md)
* [Workflows](cronus-framework/workflows.md)
* [Indices](cronus-framework/indices.md)
Expand Down
4 changes: 4 additions & 0 deletions docs/cronus-framework/domain-modeling/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Domain Modeling

To get out the maximum of Cronus you need to mark certain parts of your code to give hints to Cronus.

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

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

2 changes: 2 additions & 0 deletions docs/cronus-framework/domain-modeling/published-language.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Published Language

2 changes: 2 additions & 0 deletions docs/cronus-framework/domain-modeling/value-object.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Value Object

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

[ISerializer](https://github.com/Elders/Cronus/blob/master/src/Elders.Cronus/Serializer/ISerializer.cs#L5-L9) interface is simple. You can plug your own implementation in but should not change it once you are in production.

The samples in this manual work with Json and Proteus-protobuf serializers. Every Command, Event, ValueObject or anything which is persisted is marked with a DataContractAttribute and the properties are marked with a DataMemberAttribute. [Here is a quick sample how this works \(just ignore the WCF or replace it with Cronus while reading\)](https://msdn.microsoft.com/en-us/library/bb943471%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396). We use `Guid` for the name of the DataContract because it is unique.

## Best Practices

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

* you **must** add private parameterless constructor
* you **must** initialize all collections in the constructor\(s\)
* you **can** rename any class whenever you like even when you are already in production
* you **can** rename any property whenever you like even when you are already in production
* you **can** add new properties
{% endhint %}

{% hint style="warning" %}
**You should not...**

* you **must not** delete a class when already deployed to production
* you **must not** remove/change the `Name` of the `DataContractAttribute` when already deployed to production
* you **must not** remove/change the `Order` of the `DataMemberAttribute` when deployed to production. You can change the visibility modifier from `public` to `private`
{% endhint %}

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

Compared to Port, which can dispatch a command, a Gateway can do the same but it also has a persistent state. A scenario could be sending commands to external BC, such as push notifications, emails etc. There is no need to event source this state and its perfectly fine if this state is wiped. Example: iOS push notifications badge. This state should be used only for infrastructure needs and never for business cases. Compared to Projection, which tracks events, projects their data, and are not allowed to send any commands at all, a Gateway can store and track metadata required by external systems. Furthermore, Gateways are restricted and not touched when events are replayed.

## Communication Guide Table

| Triggered by | Description |
| :--- | :--- |
| Event | Domain events represent business changes which have already happened |

## Best Practices

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

* a gateway **can** send new commands
{% endhint %}

2 changes: 2 additions & 0 deletions docs/message-handlers/projections.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

Projection tracks events and project their data for specific purposes.

## Communication Guide Table

| Triggered by | Description |
| :--- | :--- |
| Event | Domain events represent business changes which have already happened |
Expand Down

0 comments on commit 44c6c8f

Please sign in to comment.