Squidex / squidex

Headless CMS and Content Managment Hub
https://squidex.io
MIT License
2.26k stars 455 forks source link

[Question] CQRS #212

Closed mjavadhpour closed 6 years ago

mjavadhpour commented 6 years ago

I just try to follow the CQRS Pattern in Squidex according to the documentation:

architecture

I have known that you remove CQRS principle for some reason. but I want to understand what is the old workflow and how you handle it. I follow the request from API Layer to find each part of the application.

The main question is:

Thank you.

SebastianStehle commented 6 years ago

Hi, it is still the old workflow. The new workflow is not 100% done yet, but I think I will finalize it between christmas and new year.

About you questions:

The big change is basically reflected by this line:s https://github.com/Squidex/squidex/blob/00293d0f5eaba90104ab0eac0f0ca4a02c949729/src/Squidex.Infrastructure/Commands/DomainObjectBase.cs#L103

You see that each domain object (App, schema, content, asset, ...) also writes the snapshot directly, which is also used for querying data (over snapshots). But the infrastructure has not been changed. Events can still be used to subscribe to them or to do less important stuff (e.g. update statistics).