From f916ca7703ff26f51f079e4b4a99afc0659ac0cb Mon Sep 17 00:00:00 2001 From: Einar Ingebrigtsen Date: Sun, 29 Dec 2024 19:36:35 +0100 Subject: [PATCH] Simplifying structure for getting started --- .../get-started/{quickstart => }/console.md | 10 +++++----- Documentation/get-started/index.md | 2 +- .../get-started/{quickstart => }/mongodb-books.png | Bin .../{quickstart => }/mongodb-borrowed-books.png | Bin .../get-started/{quickstart => }/mongodb-users.png | Bin Documentation/get-started/quickstart/toc.yml | 2 -- Documentation/get-started/toc.yml | 4 ++-- .../get-started/{quickstart => }/workbench.png | Bin Documentation/toc.yml | 2 +- 9 files changed, 9 insertions(+), 11 deletions(-) rename Documentation/get-started/{quickstart => }/console.md (96%) rename Documentation/get-started/{quickstart => }/mongodb-books.png (100%) rename Documentation/get-started/{quickstart => }/mongodb-borrowed-books.png (100%) rename Documentation/get-started/{quickstart => }/mongodb-users.png (100%) delete mode 100644 Documentation/get-started/quickstart/toc.yml rename Documentation/get-started/{quickstart => }/workbench.png (100%) diff --git a/Documentation/get-started/quickstart/console.md b/Documentation/get-started/console.md similarity index 96% rename from Documentation/get-started/quickstart/console.md rename to Documentation/get-started/console.md index 588575889..f94342dbb 100644 --- a/Documentation/get-started/quickstart/console.md +++ b/Documentation/get-started/console.md @@ -47,9 +47,9 @@ The following snippet configures the minimum and discovers everything for you: ## Events Defining an event is straightforward. You can use either a C# `class` or a `record` type. -We recommend using a `record` type because records are immutable, which aligns with the nature of an [event](../../concepts/event.md). +We recommend using a `record` type because records are immutable, which aligns with the nature of an [event](../concepts/event.md). -To define an event type, simply add the `[EventType]` attribute to the new type. This attribute allows the discovery system to automatically detect all event types. You can read more about event types [here](../../concepts/event-type.md). +To define an event type, simply add the `[EventType]` attribute to the new type. This attribute allows the discovery system to automatically detect all event types. You can read more about event types [here](../concepts/event-type.md). Below is a set of events we will use for our library sample. @@ -58,7 +58,7 @@ Below is a set of events we will use for our library sample. ## Appending events Once you have defined the events, you can start using them. -Events represent state changes in your system, and you use them by appending them to an [event sequence](../../concepts/event-sequence.md). +Events represent state changes in your system, and you use them by appending them to an [event sequence](../concepts/event-sequence.md). Chronicle provides a default event sequence called the **event log**. The **event log** is typically the main sequence you use, similar to the `main` branch of a **Git** repository. @@ -78,7 +78,7 @@ The following code appends a couple of `UserOnboarded` events to indicate that u Next, we want to append a couple of events to represent books being added to our inventory: {{snippet:Quickstart-DemoData-Books}} -Notice that the first parameter for the `Append` method is the [event source identifier](../../concepts/event-source.md). +Notice that the first parameter for the `Append` method is the [event source identifier](../concepts/event-source.md). This identifier uniquely represents the object we're working on, similar to a **primary key** in a database. In our example, we are dealing with two concepts: **user** and **book**, so the identifiers will uniquely represent individual users and books. @@ -169,7 +169,7 @@ Opening your database client, you should be able to see the books: ### Projections -While reducers provide a programmatic, imperative approach to altering state in your system, [projections](../../concepts/projection.md) offer a declarative approach. +While reducers provide a programmatic, imperative approach to altering state in your system, [projections](../concepts/projection.md) offer a declarative approach. Although projections may not have the flexibility of a **reducer** or the power of a **reactor**, they possess unique capabilities that can be challenging to achieve with a **reactor** or **reducer**. For instance, projections support relationships such as one-to-many and one-to-one. When your goal is to produce state, projections will often be sufficient and will help you achieve your objectives more quickly. diff --git a/Documentation/get-started/index.md b/Documentation/get-started/index.md index 4cd299f99..f783e626c 100644 --- a/Documentation/get-started/index.md +++ b/Documentation/get-started/index.md @@ -4,4 +4,4 @@ Below are articles designed to get you started quickly. | Topic | Description | | ----- | ----------- | -| [Console Quickstart](./quickstart/console.md) | Quickstart for a console app | +| [Console Quickstart](./console.md) | Quickstart for a console app | diff --git a/Documentation/get-started/quickstart/mongodb-books.png b/Documentation/get-started/mongodb-books.png similarity index 100% rename from Documentation/get-started/quickstart/mongodb-books.png rename to Documentation/get-started/mongodb-books.png diff --git a/Documentation/get-started/quickstart/mongodb-borrowed-books.png b/Documentation/get-started/mongodb-borrowed-books.png similarity index 100% rename from Documentation/get-started/quickstart/mongodb-borrowed-books.png rename to Documentation/get-started/mongodb-borrowed-books.png diff --git a/Documentation/get-started/quickstart/mongodb-users.png b/Documentation/get-started/mongodb-users.png similarity index 100% rename from Documentation/get-started/quickstart/mongodb-users.png rename to Documentation/get-started/mongodb-users.png diff --git a/Documentation/get-started/quickstart/toc.yml b/Documentation/get-started/quickstart/toc.yml deleted file mode 100644 index ecba33d23..000000000 --- a/Documentation/get-started/quickstart/toc.yml +++ /dev/null @@ -1,2 +0,0 @@ -- name: Console - href: console.md \ No newline at end of file diff --git a/Documentation/get-started/toc.yml b/Documentation/get-started/toc.yml index 2d26785ca..ecba33d23 100644 --- a/Documentation/get-started/toc.yml +++ b/Documentation/get-started/toc.yml @@ -1,2 +1,2 @@ -- name: Quickstart - href: quickstart/toc.yml +- name: Console + href: console.md \ No newline at end of file diff --git a/Documentation/get-started/quickstart/workbench.png b/Documentation/get-started/workbench.png similarity index 100% rename from Documentation/get-started/quickstart/workbench.png rename to Documentation/get-started/workbench.png diff --git a/Documentation/toc.yml b/Documentation/toc.yml index 6e1873946..5674dde2a 100644 --- a/Documentation/toc.yml +++ b/Documentation/toc.yml @@ -1,4 +1,4 @@ -- name: Tutorials +- name: Getting started href: get-started/toc.yml - name: Concepts href: concepts/toc.yml