Domain-driven design (DDD) is an approach to develop software for complex needs by connecting the implementation to an evolving model.
0
votes
1answer
28 views
In OnionArchitecture can UI talks directly to datastore or not?
I'm fan of onion architecture but looking for some relaxing solutions in some areas.
First of all I was thinking about communicating directly from UI (from controller in mvc) to data on the read ...
0
votes
0answers
23 views
Subtyping and Enumerable invariant
I have read the following from http://stackoverflow.com/questions/56860/what-is-the-liskov-substitution-principle
Subtyping is appropriate where the invariants can be enumerated.
If you agree ...
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
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 ...
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 ...
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
114 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 ...
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 ...
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 ...
1
vote
2answers
75 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
136 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 ...
2
votes
5answers
2k views
Application layer vs domain layer?
I am reading Domain-Driven Design by Evans and I am at the part discussing the layered architecture. I just realized that application and domain layers are different and should be separate. In the ...
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) ...
2
votes
2answers
279 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 ...
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 ...
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 ...
12
votes
9answers
1k views
Do immutable objects and DDD go together?
Consider a system that uses DDD (as well: any system that uses an ORM). The point of any system realistically, in nearly every use case, will be to manipulate those domain objects. Otherwise there's ...
2
votes
1answer
135 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?
...
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
250 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
380 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
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 ...
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 ...
2
votes
2answers
352 views
Web workflow solution - how should I approach the design?
We've been tasked with creating a web based workflow tool to track change management. It has a single workflow with multiple synchronous tasks for the most part, but branch out at a point to tasks ...
1
vote
2answers
320 views
Are factors such as Intellisense support and strong typing enough to justify the use of an 'Anaemic Domain Model'?
It's easy to accept that objects should be used in all layers except a layer nominated as a data layer. However, it's just as easy to end-up with an 'anaemic domain model' that is just an object ...
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
307 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 ...
1
vote
1answer
229 views
Drawback of implementing DDD service as static class?
Can Services in a domain-driven design be implemented as C# static class? What are the drawbacks of this choice? Can it be implemented as a non-singleton non-static class?
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 ...
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
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 ...
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
179 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
149 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. ...
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 ...
7
votes
1answer
568 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 ...
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
494 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, ...
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 ...
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
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 ...


