Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thorium/simplecqrs-fsharp
Simple CQRS implemented with F#
https://github.com/thorium/simplecqrs-fsharp
cqrs fsharp
Last synced: 3 months ago
JSON representation
Simple CQRS implemented with F#
- Host: GitHub
- URL: https://github.com/thorium/simplecqrs-fsharp
- Owner: Thorium
- Created: 2012-03-07T23:44:36.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2014-01-30T20:16:42.000Z (about 11 years ago)
- Last Synced: 2024-11-01T13:42:18.741Z (3 months ago)
- Topics: cqrs, fsharp
- Language: JavaScript
- Homepage:
- Size: 1.46 MB
- Stars: 84
- Watchers: 5
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
Simple CQRS on F# (F-Sharp) 3.0
Based on Greg Young's CQRS: https://github.com/gregoryyoung/m-r/tree/master/SimpleCQRS
CQRS is Command and Query Responsibility Segregation -pattern.
If you don't know that, use Google or look http://martinfowler.com/bliki/CQRS.html
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): http://www.microsoft.com/visualstudio/11/en-usOptional:
+ Reactive extensions: http://msdn.microsoft.com/en-us/data/gg577609There 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 as event bus
- Uses reactive framework ReplaySubject 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...