Showing posts with label DDD. Show all posts
Showing posts with label DDD. Show all posts

Friday, 21 December 2012

Ubiquitous Language

A core principle of domain-driven design is to use a language based on the model.

Wednesday, 19 December 2012

Create a DDD Solution


Starting a New Solution

  • Create a Blank Solution
  • Add a Core Class Library Project
  • Add an Infrastructure Class Library Project
  • Add your UI project (Console, WinForms, WPF, ASP.NET MVC)
  • Add references to Core from Infrastructure and UI 
  • Add a reference to Infrastructure from UI

  • Add a Controller, View
  • Add an Interface <IMyInterface> (new folder "Interfaces" in Core) with a method
  • Implement the Interface in Infrastructure (in a class <MyInterface>) with the method
  • In the controller:
  • Add the private field of the <IMyInterface>
  • Add the constructor with <IMyInterface> as parameter
  • Add the constrcutor without parameter to add the parameter
  • In the control, call the method and show the result to the view



Domain-Centric Design / Domain Driven Design

The problem-space of your application is its domain.  If you are going to write a banking software system, you need to have a good understanding of what banking is all about, you must understand the domain of banking.

A domain is something of this world and we need to create an abstraction (a blueprint) of the domain to transform the domain into software constructs.  The abstraction is a model, our internal representation of the target domain.

The model is the common ground, the place where the software meets the domain.

The objects you design to model the domain are domain objects (model objects / model).
  • Encapsulate application business logic and rules
  • Maintain any state required to do so
  • Do not depend on external infrastructure concers