Giter Club home page Giter Club logo

lokad-iddd-sample's Introduction

Sample code for IDDD Book by Vaughn Vernon

This is a .NET Sample Project to accompany Event Sourcing materials from the book by Vaughn Vernon: Implementing Domain-Driven Design.

Event Sourcing pattern was introduced to DDD world by Gregory Young. A+ES appendix in IDDD book and this sample are mainly based on his work in pushing the state of art in this field.

Contents

This project includes a sample domain implemented with the event sourcing pattern. Multiple persistence options are provided:

  • Microsoft SQL Server
  • MySQL
  • File storage
  • Windows Azure Blob Storage

Usage

Start by downloading sources (ZIP, Visual Studio) or by cloning a git repository:

$ git clone git://github.com/Lokad/lokad-iddd-sample.git

Then, open solution in Visual Studio (MonoDevelop might also work) and run the project. The project is auto-configured to use file storage by default, and cleans it on every start.

You should see something like:

Command: Create customer-12 named 'Lokad' with Eur
  customer-12 r0 Event: Customer Lokad created with Eur
  customer-12 r0 Event: Added 'Welcome bonus' 15 EUR | Tx 1 => 15 EUR
  Completed in 145 ms
Command: Rename customer-12 to 'Lokad SAS'
  customer-12 r1 Event: Customer renamed from 'Lokad' to 'Lokad SAS'
  Completed in 27 ms
Command: Charge 20 EUR - 'Forecasting'
  customer-12 r2 Event: Charged 'Forecasting' 20 EUR | Tx 2 => -5 EUR
  Completed in 16 ms

Then, you can dive into the code by starting with Domain folder in this solution. There also is a UnitTests project, which contains unit tests for the domain (in form of Given-When-Then specifications)

You can also try plugging in other types of event stores. Each event store requires connection string and will auto-create all required resources automatically.

Want More?

If you want more details, here's what you can do next:

If you have any questions, please feel free to ask the contributors.

Authors and Contributors

  • Vaughn Vernon, Book author and reviewer.
  • Rinat Abdullin, A+ES text and this sample project. Tech Leader at Lokad, Big Data Analytics for Retail.
  • Gregory Young, theory and practice of introducing Event Sourcing to Domain-Driven Design.

This sample is based hugely on inspiration and support provided by following outstanding gentlemen:

As for bugs in the code and typos in the accompanying texts, please feel free to attribute them to Rinat Abdullin. Reporting them (e.g. by dropping me a tweet or an email) would be extra cool :)

lokad-iddd-sample's People

Contributors

abdullin avatar vermorel avatar vsevolodp avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.