Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DDD "Module" in C#.NET

In the Evan's DDD book he speaks of segregating concepts in the domain with "modules". The term "module" can be translated to a number of different things in software development, both conceptual and concrete, so I'm wondering how would this concept of DDD modules be expressed in a C#.NET system and if there is any direct correlation to other uses of the term "module" in software development (For example, Evans mentions that some developers express DDD modules as Java packages which I think would be analogous to .NET assemblies).

I think, you could probably express this concept literally with separate .NET assemblies or perhaps with namespaces (which is kind of what we're doing now). We are planning to reduce the number of projects within our solution to improve build time so I'm really interested in how this concept could be applied to a single assembly.

like image 703
hcoverlambda Avatar asked Mar 23 '10 20:03

hcoverlambda


People also ask

What is a module in DDD?

A Module serves as a container for a specific set of classes of your application. In PHP this would be a specific namespace that contains all of the related classes for that specific concept. The code within a module should be highly cohesive and there should be low coupling between classes of different modules.

What is domain driven design example?

An aggregate is a domain-driven design pattern. It's a cluster of domain objects (e.g. entity, value object), treated as one single unit. A car is a good example. It consists of wheels, lights and an engine.

What is DDD in asp net core?

“Domain-driven design (DDD) advocates modeling based on the reality of business as relevant to your use cases. In the context of building applications, DDD talks about problems as domains.

Is DDD a software architecture?

Modern Software Architecture with Domain Driven Design (DDD). Introduction on DDD and its relation to Microservices, Reactive Systems, BPM, Agile, CQRS and Event Sourcing.


1 Answers

You already answered your own question. That you use either projects or namespaces as a logical separation of modules. You can also use the break down of projects on their type to imply meaning also, as in web services projects are exposed modules vs internal ones etc.

Personally I am a fan of using actual projects and later if the number of DLLs is ever an issue to condense it using ILMerge in my production builds, of course my solution is only around 30~ projects at the moment.

like image 142
Chris Marisic Avatar answered Oct 01 '22 00:10

Chris Marisic