Winning the game with CQRS/event sourcing and BDD

by Tom 1. September 2010 15:59

Yes !! I did it !!!

I have been making a few attempts to combine BDD with CQRS/event sourcing, since they seem to make a perfect fit.

After mailing to the DDD/CQRS newsgroup for a few times, I finally managed to make something presentable... this is the BDD part for the domain :

And this is the resulting output after running the console runner

This is the context, notice how setting up the interpreter usually only takes a single line (i.e. register an event, execute a command, or check something)

And this is the implementation of the domain class

And it's domain handler

As wel as a view updater (in reality this view store would be queried be a winform or webform directly)

Please do note that the current Event Store and Aggregate store are not persisted; IRL you would have to persist the event store (forward write-only), and probably some snapshots from your aggregate root as well (maybe using a bigtable); this should be easy to add, I might do this in a later phase....

You can find the full sourcecode in this zip:

SimpleCQRS2.zip (76,94 kb)

Update !!

I uploaded the sourcecode to github : http://github.com/ToJans/CQRSNode

I also added (currently synchronous) a node.js -like implementation...

Bookmark and Share

Comments

9/2/2010 8:37:24 AM #

pingback

Pingback from topsy.com

Twitter Trackbacks for
        
        Winning the game with CQRS/event sourcing and BDD
        [corebvba.be]
        on Topsy.com

topsy.com |

About Tom

Tom Janssens op LinkedIn

Tom Janssens op twitter

Core bvba RSS

 

Tom Janssens is an independent freelance ICT consultant that has been "into computers" ever since the age of 7.

Typing source code from a book evolved into exploring the limits of coding in procedural, assembly and object-oriented languages.
As he matured in software coding, he started focussing on the problems surrounding software development, and learned that software development is usually about people and interactions first, and about technology second.

Due to his diverse track record he gained insights in a lot of aspects of the software development process. Currently his main focus is on strategic ICT advice, lean product/project development and improving the software development process and architecture.

He avoids ivory-tower-approaches by applying and verifying the applicability of the latest tech buzz in software experiments.

He is also the founder of the following LinkedIn groups:

CQRS Professional
BDD Professional
Asp.Net MVC professional

More info about Tom and his company...


Advertisement

Forget all your SCRUM -, Kanban - and other Agile and Lean certificates

Here is the only true AGILE and LEAN certificate you will ever need:

The Creative Recursive Analysis Process Certificate
(CRAP Certificate for short)

More info can be found at the official CRAP certificate website:
http://bit.ly/CRAPCertificate