Domain-driven design (DDD) is an approach to develop software for complex needs by connecting the implementation to an evolving model.
0
votes
3answers
79 views
How to handle complex conditions? [duplicate]
We are working on project where we have to manage these conditions.
i.e.:
A User can save an order under these conditions:
User has permission "SaveOrder"
Order is in state "shipped"
Online Shop is ...
1
vote
2answers
146 views
Anemic Domain Model vs. DDD by definition example(s)?
What is an example of "Business Logic" that should reside in the DomainModel i.e. inside an Entity instead of inside a (Domain) Service, as well as some example logic that should be in a service.
...
2
votes
1answer
111 views
DDD/SOA in (.NET) MVC and Message pattern(s) / Request Response
We're currently considering whether it makes sense (or if the benefits are worth the added code) to introduce a Message based pattern (such as Request Response) into a Domain Driven Design / Service ...
3
votes
1answer
68 views
Handling ground-breaking changes in a production system - Insert intermediate level Management object
As our client request, we are proceeding to change the base of our system. We already have the following structure:
A class has many students. (simple typical one - to - many)
Now we must change ...
0
votes
1answer
99 views
Shouldn't Location be a Value Object?
Eric Evan's DDD book, Cargo Shipping Example, pg. 168:
Location
Two places with the same name are not the same. Latitude and longitude
could provide a unique key, but probably not a very ...
3
votes
2answers
193 views
Single Responsibility principle VS KISS principle
Let's assume the modeling of User model in a context of a social network.
User concept is composed of two notions:
Authentication elements like userName/Password/Email etc...
Extra data information ...
5
votes
3answers
236 views
Is Domain Entity violating Single Responsibility Principle?
Single responsibility ( reason to change ) of an entity should be to uniquely identify itself, in other words, its responsibility is to be findable.
Eric Evan's DDD book, pg. 93:
most basic ...
1
vote
2answers
74 views
DDD - Domain Object calling a web service
Is it ok to call a webservice from a Domain object?.
As I write the question I am thinking that you should never do that, as it is poor design, but the situation is the following:
I have a domain ...
3
votes
1answer
127 views
Unique Value Object vs Entity
Trying to convert some entities into value objects I am stuck in a case where what seems a value object must be unique within an aggregate.
Suppose we have a Movie entity which makes the root of an ...
1
vote
1answer
63 views
Entites in Invalid State
I'm looking into developing my entities so that they cannot be in an invalid state.
In particular I'm starting with my Customer entity. This would have fields like:
Title (enum)
FirstName (string)
...
3
votes
2answers
133 views
A design decision in composition or aggregation
I've recently had doubts about some design decisions that I frequently make, so this time I decided to take some time and try to analyze it to find the best solution. I will describe a simple scenario ...
0
votes
0answers
68 views
which of the following mongo documents structures are more suited for storing business rules for a loyalty program?
I have been going through MongoDB to evaluate it as an option for storing business rules which are to be applied before we calculate reward for an end-user. The platform in questions is a loyalty ...
0
votes
2answers
140 views
Converting Business Process Maps into Software
I am fairly new to web application development. I have defined my problem domain through talking to various stakeholders and putting a process map together - basically a flow chart showing the ...
16
votes
5answers
1k views
Unit Testing in a “no setter” world
I do not consider myself a DDD expert but, as a solution architect, do try to apply best practices whenever possible. I know there is a lot of discussion around the pro's and con's of the no (public) ...
5
votes
2answers
212 views
Domain Services as facades
I read .NET Domain-Driven Design with C#: Problem - Design - Solution and I noticed that the author created a domain service for each aggregate root.
However, the domain services were only facades to ...
2
votes
2answers
276 views
Identifying Domain Services & Application Services when doing DDD
-I'm trying to figure out how to identify Application Services in my application. I think I can identify a Domain service by 2 things:
It acts as a facade to the repository.
It holds business logic ...
2
votes
1answer
134 views
Domain Driven Design with an EAV database model
How can one apply DDD to a EAV database model?
Consider this EAV database model:
How am I supposed to build a domain model if all my entities and their attributes will be stored in the database?
...
5
votes
2answers
230 views
Avoiding ubiquitous language clashes
I have been reading DDD Quickly and wondered about how to avoid naming clashes with technical terms and domain terms. For example, if I commonly used the repository pattern (with classes such as ...
0
votes
3answers
110 views
Should a service use session information?
As an example, if I have a Post service and have a method to retrieve all posts for the logged in user, is it OK to have a findPosts() method that uses an injected Security service to get the user ID ...
5
votes
3answers
248 views
Good practices to implement mappers in a multi-tier application
When you are working with a multi-tier application very often you run into task of converting objects in one layer to objects in another layer. This could be converting database objects into domain ...
5
votes
3answers
378 views
DDD - Aggregate Roots - Dealing with Efficiency and Concurrency
First off, I'll admit that I'm a newbie to DDD and need to read the "blue book".
I'm building a system that has an AggregateRoot of type "Match". Each Match can have a collection of "Votes" and also ...
5
votes
2answers
246 views
Unit Test Friendly Domain Driven Design
Many of the readings I've done on DDD, both in books and online, seem to represent code that, often times, is difficult or impossible to unit test. For example, there are numerous samples with static ...
3
votes
5answers
321 views
What is the business cost of anemic domain model
I am looking to quantify the cost or problems of bad software development practices. Specifically can software that has been developed resulting in an anemic domain model be quantifiable in terms of ...
3
votes
1answer
136 views
Aggregate Root and Lots of Data Efficiency
It's more of a scenario, but it isn't far fetched at all. Let's say I have an Aggregate Root (AR) Warehouse which it's used to manage product stock. The Product itself is an AR in a different bounded ...
1
vote
1answer
335 views
Examples of N-Tier design with Rich Domain Model
I am looking for some well structured samples implemented using Domain Driven Design that include a rich Domain model. Currently I tend to design systems with Anaemic Domain Model and according to ...
2
votes
2answers
392 views
Do we achieve 100% Persistence Ignorance solution if we're not using ORM's POCO objects to model the Domain?
Persistence ignorance is ability to retrieve/persist standard objects, where standard objects are considered as classes focused on particular business problem and thus don't contain any ...
2
votes
2answers
305 views
Presentation VS Application layer in DDD
I have trouble drawing a clear line between Presentation and Application layer in Domain Driven Design.
Where should Controllers, Views, Layouts, Javascript and CSS files go?
Is it in the ...
3
votes
1answer
160 views
DDD and filtering
I am developing an app in ddd maner. So I have a complex domain model. Suppose I have a Fare object and Airline. Each Airline should contain several or much more Fares.
My UI should represent Model ...
5
votes
1answer
181 views
Domain Model and Querying
I am new to DDD, having worked only in Transaction-Script apps with an anemic model, or just Big Balls of Mud, so please forgive any terminology I abuse.
I am trying to understand the proper ...
1
vote
1answer
120 views
When do domain concepts become application constructs?
I recently posted a question regarding recovering a DDD architecture that became an anemic domain model into a multitier architecture and this question is a follow-on of sorts.
My question is when ...
2
votes
3answers
402 views
DDD and Value Objects. Are mutable Value Objects a good candidate for Non Aggr. Root Entity?
Here is a little problem
Have an entity, with a value object. Not a problem. I replace a value object for a new one, then nhibernate inserts the new value and orphan the old one, then deletes it. Ok, ...
1
vote
1answer
177 views
Is there a clean separation of my layers with this attempt at Domain Driven Design in XAML and C#
I'm working on an application. I'm using a mixture of TDD and DDD. I'm working hard to separate the layers of my application and that is where my question comes in.
My solution is laid out as ...
4
votes
2answers
178 views
Keeping a domain model consistent with actual data
Recently domain driven design got my attention, and while thinking about how this approach could help us I came across the following problem.
In DDD the common approach is to retrieve entities (or ...
3
votes
4answers
371 views
DDD: Service or Repository
I am developing an app in DDD manner. And I have a little problem with it.
I have a Fare (airline fare) and FareRepository objects. And at some point I should load additional fare information (from a ...
4
votes
1answer
148 views
DDD: service contains two repository
Does it correct way to have two repository inside one service and will it be an application or domain service?
Suppose I have a Passenger object that should contains Passport (government id) object. ...
1
vote
1answer
216 views
DDD Model Design and Repository Persistence Performance Considerations
So I have been reading about DDD for some time and trying to figure out the best approach on several issues.
I tend to agree that I should design my model in a persistent agnostic manner. And that ...
3
votes
1answer
467 views
How to manage long running background threads and report progress with DDD
Title says most of it. I have found surprising little information about this. I have a long running operation of which the user wants to see the progress (as in, item x of y processed). I also need to ...
2
votes
1answer
493 views
Recovering an anemic domain model into a multitier architecture
I have spent the past several days learning about domain driven design and attempting to apply it to a current project. I decomposed the problem domain into the canonical logical components: domain, ...
7
votes
1answer
567 views
How to choose between using a Domain Event, or letting the application layer orchestrate everything
I'm setting my first steps into domain driven design, bought the blue book and all, and I find myself seeing three ways to implement a certain solution. For the record: I'm not using CQRS or Event ...
5
votes
6answers
185 views
In a team practicing Domain Driven Design, should the whole team participate in Stakeholder meetings?
In my experience, a Software Development Team that comprises:
1 Project Manager
1 Tech Lead
1 - 2 Senior Dev
2 - 3 Junior Dev (Fresh grad)
Only the Tech Lead & PM (and/or Senor Dev/s) will ...
3
votes
2answers
256 views
Can the following Domain Entity contain logic for creating/deleting other entities?
a) As far as I understand it, in most cases Domain Model DM doesn't contain code for creating/deleting domain entities, but instead it is the job of layers ( ie service layer or UI layer ) on top of ...
5
votes
6answers
421 views
Should a domain expert make class diagrams?
The domain expert in our team uses UML class diagrams to model the domain model.
As a result, the class diagrams are more of technical models rather than domain models (it serves of some sort of ...
3
votes
2answers
55 views
Resources on securing domain models? [closed]
I'm have good resources on both security, domain modelling, and architecture patterns. I've noticed a distinct lack of any suggestion of how and where to integrate security into the systems I build. I ...
6
votes
3answers
365 views
Accessing Repositories from Domain
Say we have a task logging system, when a task is logged, the user specifies a category and the task defaults to a status of 'Outstanding'. Assume in this instance that Category and Status have to be ...
1
vote
1answer
120 views
design pattern advice: graph -> computation
I have a domain model, persisted in a database, which represents a graph. A graph consists of nodes (e.g. NodeTypeA, NodeTypeB) which are connected via branches. The two generic elements (nodes and ...
3
votes
1answer
302 views
Domain Models (PHP)
I have been programming in PHP for several years and have, in the past, adopted methods of my own to handle data within my applications.
I have built my own MVC, in the past, and have a reasonable ...
7
votes
3answers
253 views
Resources for popular domain models
I have come across many situations where I had to build a system for a library or a clinic or other popular domains.
The thing is a domain model for a library was probably done 1000 times already with ...
7
votes
10answers
653 views
Should an image be able to resize itself in OOP?
I'm writing an app that will have an Image entity, and I'm already having trouble deciding whose responsibility each task should be.
First I have the Image class. It has a path, width, and other ...
6
votes
2answers
283 views
DDD / Layers and legacy systems
I have to refactor a complex C# app (many dialogs, mixed logic and so on).
There is a part managing the communication with special hardware equipments (sending commands and receive data via ...
4
votes
1answer
205 views
Is it Ok if Domain Object cross Service Boundary
Is it Ok if Domain Object cross Service-Boundary?
Everyone recommend that only DTO should be returned by Services.
I am creating simple CRUD application.
Is it ok if my service methods return ...
