Dariss
Dariss

Reputation: 1258

Domain Driven Design - CQRS + ES usage

I have a question to people, who implemented CQRS + Event Sourcing architecture in their own projects.

I would like to know, if in long term is it better to use CQRS open source library for your project or to implement it by yourself?

If by yourself, should it be implemented as library for company or it should go hand by hand with project that use it?

What are cons and pros for each of the way?

Upvotes: 2

Views: 171

Answers (2)

Kyle
Kyle

Reputation: 186

I would say try implement a basic home-made solution while using the open-source package as a guideline. Then once completed use the open-source package (NServiceStore).

May seem unnecessary, but I found when I implemented CQRS that it helps to understand the inner-workings of CQRS. Was able to grasp CQRS pattern better and make a more informed decision on my business rules than if I went straight to using the packages.

Also, like marianoc mentioned, it shouldn't be difficult to swap out infrastructural implementations if the need arises in the future.

Upvotes: 3

BAD_SEED
BAD_SEED

Reputation: 5056

In both case you should design the right interface to decouple your Domain from the infrastructure itself. At this point the two solutions (home made vs. open source) are a matter of taste.

An home-made solution gives you a better insight on the whole infrastructure. This is a CONs if you are late on time or you need to be ready as soon as possible.

An open-source solution gives you community support while you can still looks into code and learn. If the project dies is a problem but you have source code and do what you want (even resurrect it) or if you are really decoupled by your Domain you can replace infrastructure easily.

My suggestion goes towards NEventStore.

Upvotes: 3

Related Questions