Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DDD with .NET - Is there common infrastructure library available?

We're starting a web application using DDD and CQRS (using the ncqrs framework) and before we get started writing our own infrastructure class library, i wanted to see if any are already available.

I'd think at least some basic interfaces and common implementations for writing to the file system, sending emails, etc could be used in any project.

like image 505
jaminto Avatar asked Dec 30 '11 03:12

jaminto


2 Answers

Those types of services are sufficiently context dependent to be unyielding to common frameworks above the facilities provided by the .NET Framework. There may frameworks centered around specific tasks, such as emailing, however you're better of selecting a solution that fits the requirements, instead of the converse. Instead, consider reviewing some sample DDD projects as listed here.

like image 155
eulerfx Avatar answered Sep 30 '22 21:09

eulerfx


I agree with what eulerfx stated earlier. I'd add that if you depend upon a framework for using DDD and CQRS, then you risk depending on the framework and not truly understanding what is happening. As a result, you may miss what DDD (and CQRS) is providing to you.

I will state that I started off learning about CQRS by using a framework (NCQRS in fact), but my DDD knowledge was based on Evans' book and I didn't look for a framework for modeling my domain. As each domain is unique to the problem, I think it's hard to truly have a framework that "helps" you implement DDD.

In retrospect, I wish I had not gone with NCQRS right from the start as I missed or passed over some of the subtleties of the CQRS pattern.

There are probably some DDD frameworks out there, but I'd recommend forgoing them and build your own. You'll thank yourself later.

Hope this helps. Good luck!

like image 20
David Hoerster Avatar answered Sep 30 '22 19:09

David Hoerster