Simple CQRS implemented with F#
Switch branches/tags
Nothing to show
Clone or download
Latest commit cf88b93 Jan 29, 2014


Simple CQRS on F# (F-Sharp) 3.0

Based on Greg Young's CQRS:

CQRS is Command and Query Responsibility Segregation -pattern.
If you don't know that, use Google or look
I have separated command side and query side as different projects.

This is F# solution. Compared to C#:
  + Simpler source code
  + No need for any "InfrastructureCrap"
  + Domain objects doesn't need to have parameter less constructors
  + Interactive-driven development
What you will need to run this:
  + Visual Studio 11 (Beta):

  + Reactive extensions:

There are two versions of event storage:
1) Pure F# as EventStorage.fs
   - Uses pure .NET Events with F# Observable as event bus
   - Uses MailboxProcessor ("agents"/message passing) as event storage
2) F# with Reactive Extensions as EventStorageRx.fs
   - Uses reactive framework Subject<T> as event bus
   - Uses reactive framework ReplaySubject<T> as event storage
Although technical concept is different, the functionality is identical.

You can run this with F# interactive, directly from files and/or using Script.fsx.

This QuerySide is just in-memory one as in Greg's example. 
I suggest using F# Type Providers in QuerySide with real database...