understanding CQRS structure

33 views
Skip to first unread message

VENUS

unread,
Mar 13, 2018, 10:21:37 PM3/13/18
to Axon Framework Users
Hi,

Is this group for experts? Can i ask basic question please as I am new to CQRS?

As i understood so far , There is presentation layer --> Domain Layer ---> Interface Layer

So CQRS sits in Domain Layer, so what is the class level structure in Domain Layer?

a) Which will be first class in Domain layer with which Presentation layer will interact, I mean Wud it be controller?
b) What is relation between Aggregate root , domain Model and commands? 


i read a lot of doc, but i am confused which class to talk with which? 
It would be really helpful if someone could please explain ?

Allard Buijze

unread,
Mar 16, 2018, 8:13:32 AM3/16/18
to axonfr...@googlegroups.com
Hi Venus,

this mailinglist is definitely not for experts only.
In my opinion, layers aren't as important as they used to be in a CQRS based architecture. There is still a separation of different concerns, but the concept of "layer" is not the best match here.

CQRS is an architectural design pattern that exceeds any single "layer" in your architecture. One could even argue it replaces layers altogether.

Your presentation components interact with the domain, either through Commands (to change something), or through Queries (to display information). A Command arrives at an Aggregate, where state changes are validated and reported through events. These Events are handled by Event Handlers, which update certain Query Models (as well as other things that need to be triggered by events). When the UI sends a Query, it is handled by a Query Handler, which uses the Query Models to build a response.

Microsoft has written a pretty comprehensible book on CQRS, which is freely available for download: https://msdn.microsoft.com/en-us/library/jj554200.aspx
Alternatively, have a look at a webinar I did together with Pivotal: https://www.youtube.com/watch?v=Jp-rW-XOYzA

Cheers,

Allard

--
You received this message because you are subscribed to the Google Groups "Axon Framework Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to axonframewor...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Allard Buijze
CTO

E: allard...@axoniq.io
T: +31 6 34 73 99 89
Reply all
Reply to author
Forward
0 new messages