Thursday 21 January 2010

Moving to a new location

I am building my professional site which, hopefully, will aggregate all information from my blog (there were some posts in English, will be much more in future) and about all my OSS projects:
  • DDDSample.Net
  • NetMX
  • WS-Man.NET
  • MetaContainer
Feed address will be automatically adjusted so if you read this via RSS/Atom, you don't have to do anything. However, if you use browser, check this URL.

Tuesday 5 January 2010

Progress report

I am sorry for such a long silence on the blog. I was totally absorbed by other projects: NetMX and (brand new) WS-Man.NET.

But it doesn't mean that I abandoned DDDSample. After moving to git I am working on a branch of DDDSample that demonstrates Command Query Separation principle applied to DDD. If everything goes well, in two weeks I will be able to demonstrated this new version. In the meantime I will try to post some design discussions.

Thursday 10 December 2009

Moving to Git

Since implementation of the core features of DDDSample is almost finished I am thinking about opening the project for external contribution. In order to make it happen I am moving the main code repository from CodePlex's TFS to github. It will allow you to branch DDDSample.Net at will and publish your modifications online.


I would be very happy to post links to your modifications here and on the project main site on CodePlex (I am not moving the site, only the repository). Test version of the git-ed repository is available here:


git://github.com/SzymonPobiega/DDDSample.Net.git


Please download it and try if it works for you.

Thursday 3 December 2009

0.5, finally asynchronous!

I am very proud to announce that just released version 0.5 of DDDSample.Net demonstrates (finally!) how inter-aggregate communication was supposed to work from the beginning: using asynchronous communication patterns.

Version 0.5 contains 3 different work modes (you can change them using solution configuration switch):
  • InMemory. In this mode domain objects are not persisted but, instead, stored in static collections in main memory. This mode is intended to help novice users head-start with DDDSample since it does not need any additional configuration to work -- just install the msi package.
  • NHibernate. In this mode NHibernate is used to persist domain model data. Inter-aggregate communicaton is done synchronously using domain event pattern.
  • NHibernateAsynch. This mode demonstrates full power of architectural approach used in DDDSample.Net. Data is stored using NHibernate while asynchronous communication between aggregates is handled by NServiceBus/MSMQ combination.
Next (minor) step in DDDSample.Net development should be probably replacing InMemory mode with SQLite in-memory database. What's the difference? Current in-memory mode doesn't use O/RM. It would be nice to have the sample as easy to run as it is now and have it persist it's data using NHibernate so that users whould be able to see the process through all the layers.

Stay tuned!

Monday 16 November 2009

Version 0.4

This release was meant to clean-up the CI stuff. Finally I managed to get scenario-based integration test 'From Hongkong to Stockholm' working correctly using SQLite both on TeamCity and localy.

There is also some increment with regard to functionality. I added 'Next expected activity' feature and modified main menu slightly. It now includes a page for listing all registered cargoes (helps greatly in testing).

Please, download from here and try if you like it!

Tuesday 10 November 2009

Continous Integration

Hi all!

I am proud to announce that DDDSample.Net finally has a Continous Integration configured. Big thanks to Kyle who accepted my registration request for a place on CodeBetter TeamCity server.

Direct effect of this event is the 'Most recent builds' area where you can track project progress. The indirect effect is that development work will be streamlined and finally there will be some hammer to hit me when I break the build.

Next thing to do is to create a WiX script to replace the Setup Project (setup projects require Visual Studio to be installed on the machine in order to generate the installation package).

In the meantime I will try to release the 0.4 version of DDDSample. Stay tuned!

Tuesday 3 November 2009

Command Query Separation

Command Query Separation is an architectural style which encourages building two separate models for one particular domain. One model is optimized for commands (modifications, like inserts, updates and deletes) and the other is optimized for queries (probably using star, warehouse-like schema).

The goals of CQS are to make both subsystems scale well using methods best suited for each one and to free the command model (which encapsulates the core business logic) from UI related code.

DDDSample is an implementation of sample from Eric Evans' book and, as such, is not using CQS principles. It is that because its purpose is to demonstrate basics of DDD not 'polluted' by derived concepts.

Yet the DDD 'knowledge crunching' process demonstrated in the book by Evans leads to a model which is very well suited for scaling. How is it done?

It is simply because DDDSample (as well as my .NET version) is built according to other good DDD practice--one which says that communication between aggregates is asynchronous. Despite not being named officially as CSQ-driven, DDDSample model has two aggregates representing the same concept (Cargo), one optimized for commands and the other one for queries.

Most of processing-intensive operations of Cargo entity are being done via Handling aggregate which asynchronously pushes notifications into the Cargo aggregate. The latter contains a lot of redundant information which is optimized for searching cargoes and displaying cargo information on the screen.

When I was thinking about future of DDDSample.Net I thought about CQS in the first place. After careful analysis I know it will not give any breaktrough in the field of scalability, but I hope it will make these scalability enabling aspects more explicit in the codebase and will clean up the core business code from presentation concerns.