2
votes
1answer
76 views

Fire domain events after transaction completes

I am trying to implement a domain event system that only fires its events when the associated unit-of-work commits successfully. The main reason why I want to do this is because I have other ...
0
votes
3answers
118 views

Assigning responsibility for cancelling an Order

During a conversation with our Domain Expert we can across this feature: A Customer service agent can cancel an Order by decreasing its quantity. To cancel an Order we decrease its quantity by the ...
0
votes
3answers
261 views

How do you make a service stateless?

When doing Domain Driven Design it is advised that services should be stateless. There are several kinds of services when doing DDD: Application services. Domain services. Infrastructure services. ...
0
votes
1answer
159 views

Onion Architecture Structure

I am looking to understand and implement the Onion Architecture and have a vague idea on how to structure everything but need help to clear up some of my confusion. Based on different examples and ...
1
vote
1answer
159 views

What is a good practice to push notifications in a “near real-time” delay in this case?

I want to enable some real-time notifications about friend's activities (social network). Technical context is: Webapp calling backend (REST API's). Scenario is: Kevin follows Bob. When Bob ...
1
vote
1answer
178 views

How does a search functionality fit in DDD with CQRS?

In Vaughn Vernon's book Implementing domain driven design and the accompanying sample application I found that he implemented a CQRS approach to the iddd_collaboration bounded context. He presents ...
1
vote
1answer
139 views

From a DDD perspective is a report generating service a domain service or an infrastructure service?

Let assume we have the following service whose responsibility is to generate Excel reports: class ExcelReportService{ public String generateReport(String fileFormatFilePath, ResultSet data){ ...
0
votes
0answers
59 views

DDD: How to reconcile a BoundedContext with REST/WebService DTO's?

I'm just starting to learn about DDD, and I'm trying to understand how Bounded Contexts can be reconciled with client facing API's like REST/WebServices that use DTO's. For example: your system ...
0
votes
1answer
59 views

DDD / Optimizing a specific service belonging to a specific bounded context regarding hardware

Well known is the split of a whole application into several bounded contexts to emerge an Ubiquitous language. while practicing Domain-Driven Design. In general, 1 bounded context = 1 archive file ...
0
votes
1answer
123 views

A specific problem with architecturing a part of our application

Firstly, I'll try to describe the real world model of what we are trying to express in C# code. We have a device called M100. It's purpose is to read\write data from\into cards (plastic or ULTRALIGHT ...
0
votes
2answers
379 views

DDD - Domain Driven Design, which development order should be applied?

1 - Design my entities, ie (in python): class Account: def __init__(name, author): self.name = name self.email = email 2 - Design my repositories: (as interface) class ...
1
vote
1answer
629 views

Domain driven design and WCF services architecture

I am trying to figure out how to architecture my project in the DDD paradigm (a complete beginner in DDD) and stumbled upon a problem about the implementation of the web services... These are some ...
1
vote
1answer
144 views

Processing csv files (alternative to business logic in DB)

We are working on a fulfillment system for an online book store. Everyday we receive tens of CSV files (about 90 files) with data about purchased orders. Example: OrderId | BookTitle | ...
6
votes
1answer
645 views

Why database as queue so bad? [closed]

I've just read this article, and I'm confused. Let's imagine 1 webapp and 1 distinct application acting as "worker", both sharing the same database. Oh, I said "sharing"..but what does the article ...
15
votes
4answers
1k views

How does persistence fit into a purely functional language?

How does the pattern of using command handlers to deal with persistence fit into a purely functional language, where we want to make IO-related code as thin as possible? When implementing ...
2
votes
1answer
148 views

Does DDD make sense for apps which mostly present data?

I'm responsible for designing a dashboard and data manipulation front-end for a sale transaction database and am not quite sure what type of architecture to use. The database is populated by an ...
0
votes
3answers
195 views

Why should an “Order” object have a “Status” property?

I always see standard Order classes implemented with a "Status" property, but I don't feel comfortable with that. Isn't the status a property of the fulfillment process instead of the order itself? ...
16
votes
10answers
3k views

Best practice or design patterns for retrieval of data for reporting and dashboards in a domain-rich application

First, I want to say this seems to be a neglected question/area, so if this question needs improvement, help me make this a great question that can benefit others! I'm looking for advice and help from ...
0
votes
1answer
228 views

The user interface in a clean architecture with client / server model [closed]

I have been reading (and watching presentations) about subjects like: DDD, TDD, BDD, SOLID (principles), design patterns, clean code, clean architecture, agile project methodologies. All in all I ...
0
votes
1answer
137 views

Why aren't Entities allowed to reference other entities inside an aggregate except the root?

I have read in several places this following rule concerning Aggregates: Entities in one aggregate can hold references to any other Aggregate Root, but never to an Entity or Value Object inside ...
4
votes
1answer
184 views

OOP, domain models, and the user

When developing domain models, I can see two major ways of thinking about the user: The first one assumes that a program is a kind of "simulation" of what happens in the real world, and the user is ...
6
votes
2answers
1k views

DDD Bounded Contexts & Domains?

I've been working in a relatively complex application with 10's of database tables (Aggregates, Entities/Value Objects) and applying DDD. At this point it appears to be basically DDD-Lite meaning that ...
0
votes
3answers
1k views

MVVM application architecture, where to put dependency injection configuration class, BusinessLayer and Common interfaces?

Planning my architecture for an MVVM application I come to this: MyApp.UI View MyApp.BusinessLayer ViewModel MyApp.DataAccessLayer RepositoryImplEF MyApp.DomainLayer DomainObject ...
1
vote
1answer
519 views

Where to validate domain model rules that depend on database content?

I'm working on a system that allows Administrators to define Forms that contain Fields. The defined Forms are then used to enter data to the system. Sometimes the Forms are filled by a human via a ...
1
vote
3answers
424 views

Which layer does async code belong?

I am developing an application that consumes data from an external service. The application is being implemented following a typical layered architecture with UI, Presentation, Domain and Data ...
0
votes
2answers
228 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 ...
2
votes
2answers
2k 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 ...
3
votes
5answers
509 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
1k 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 ...
4
votes
2answers
303 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
1answer
159 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 ...
4
votes
2answers
276 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
1k 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 ...
5
votes
1answer
270 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. ...
2
votes
1answer
887 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
4answers
2k 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 ...
8
votes
3answers
393 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 ...
6
votes
2answers
413 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
2answers
339 views

Domain Objects with Interfaces

I'm in a situation where part of my system has a dependency on another module in the same system, but the modules themselves need to remain independently deployable, where the parts they depend on ...
1
vote
2answers
275 views

Designing a hierarchical structure with lots of reads and writes?

I am in the process of working on a video on demand system part of it involves the management of a hierarchical tree structure (think windows explorer) which allows users to upload videos, move ...
8
votes
2answers
454 views

How to make this design closer to proper DDD?

I've read about DDD for days now and need help with this sample design. All the rules of DDD make me very confused to how I'm supposed to build anything at all when domain objects are not allowed to ...
2
votes
2answers
638 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 ...
4
votes
4answers
261 views

How to decide whether to implement an operation as Entity operation vs Service operation in Domain Driven Design?

I am reading Evans's Domain Driven Design. The book says that there are entity and there are services. If I were to implement an operation, how to decide whether I should add it as a method on an ...
6
votes
5answers
7k 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 ...
4
votes
2answers
1k views

Should I use an aggregate root when designing my repository?

I have an entity that is called Master which is composed of a number of Slave entities. There can only be one Master in my database and I want to query repositories to get the Slave for a given id. ...
5
votes
2answers
343 views

How to define the seams between the domain layer and a database full of stored procedures?

We have a legacy database full of stored procedures. These stored procedures are somewhat CRUD-categorized but upon inspection of some procedures, they are not "simple" as they might update, delete, ...
14
votes
2answers
4k views

DDD - Does an aggregate root's repository handle saving aggregates?

I am using a DDD-like approach for a greenfield module of an existing application; it's not 100% DDD due to architecture but I'm trying to use some DDD concepts. I have a bounded context (I think ...
6
votes
2answers
2k views

Command handlers and DDD

I have an ASP.NET MVC application, that uses a query service to get data and a command service to send commands. My question is about the command part. If a request comes in, the command service uses ...
4
votes
4answers
335 views

Data access for composable applications

I'm wondering if anyone can share their thoughts, experience and guidance on how to approach the data access layer for a composable application? By composable application, I mean an application with ...
9
votes
1answer
1k views

Architecting a modular service application

I'm looking at architecting a new solution that is very modular by nature and would like to create a structure that supports that design to allow for easy future expansion, clear separation of ...