1
vote
0answers
81 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 ...
2
votes
0answers
115 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
109 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){ ...
1
vote
1answer
133 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 | ...
35
votes
7answers
2k views

Can a system be 100% Data Driven?

My new boss has been working on this project for many years. I've only been here a few weeks, but I am not sure it's possible. He would like to design a system that is "100% data driven". So if we ...
2
votes
1answer
356 views

DDD: Domain Model Factory Design

I am trying to understand how and where to implement domain model factories. I have included my Company aggregate as a demo of how I have done it. I have included my design decisions at the end - I ...
0
votes
1answer
126 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 ...
2
votes
2answers
172 views

In DDD are Value Object always at the leaves of a relationship tree?

If I have a photo album where each Photo can be commented on, Should the Comments be Entities or Value Object in these cases: Comments can be added only anonymously (i.e. Comments have no relation ...
0
votes
1answer
104 views

Aggregate Boundary repository/service design

I am trying to apply DDD to the design of a Release Management system. Domain Entities Project: The project/product/system. ProjectEnvironment: The environments (Test, Staging, Prod) that exist ...
4
votes
1answer
175 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 ...
0
votes
1answer
186 views

DDD, creating an aggreagate from outside the application service layer

I have a service(webservice) that is used to access to the domain logic. One of the methods of the webservice is createFoo, where Foo is my aggregate. So the class that implements the webservice's ...
4
votes
5answers
532 views

How to model an address type in DDD?

I have an User entity that has a Set of Address where Address is a value object: class User{ ... private Set<Address> addresses; ... public setAddresses(Set<Address> ...
9
votes
2answers
394 views

Where do we put “asking the world” code when we separate computation from side effects?

According to Command-Query Separation principle, as well as Thinking in Data and DDD with Clojure presentations one should separate side effects (modifying the world) from computations and decisions, ...
1
vote
1answer
331 views

Applying DDD principles in a RESTish web service

I am developing an RESTish web service. I think I got the idea of the difference between aggregation and composition. Aggregation does not enforce lifecycle/scope on the objects it references. ...
5
votes
4answers
716 views

Refactoring jQuery spaghetti code to use DDD [closed]

Most of my client side code ends up as a long script in one file the mostly looks like this: <script> function someFunction1(){/*...*/} function someFunction2(){/*...*/} ... var ...
0
votes
3answers
182 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 ...
3
votes
2answers
284 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 ...
2
votes
2answers
273 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 ...
7
votes
2answers
612 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
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 ...
2
votes
1answer
308 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? ...
1
vote
1answer
568 views

Examples of N-Tier design with Rich Domain Model [closed]

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 ...
5
votes
1answer
255 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
856 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, ...
1
vote
1answer
188 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 ...
8
votes
3answers
380 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
393 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 ...
1
vote
1answer
2k views

What is a best practice tier structure of a Java EE 6/7 application?

I was attempting to find a best practice for modeling the tiers in a Java EE application yesterday and couldn't come up with anything current. In the past, say java 1.4, it was four tiers: ...
2
votes
2answers
1k views

Equivalent of Domain Driven Design for functional programming languages

I really love the idea of domain driven design, however, as I'm learning Go, I'm wondering if there's the equivalent of DDD that's aimed at an effectively more functional language?
2
votes
2answers
587 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 ...
17
votes
5answers
958 views

Do ORMs enable the creation of rich domain models?

After using Hibernate on most of my projects for about 8 years, I've landed on a company that discourages its use and wants applications to only interact with the DB through stored procedures. After ...
1
vote
1answer
389 views

DDD and validation of aggregate root

Suppose an aggregate root : MailConfiguration (wrapping an AddressPart object). The AddressPart object is a simple immutable value object with some fields like senderAdress, recipentAddress (to make ...
19
votes
6answers
17k views

Difference between a service class and a Helper class

I would like to know what differentiates a Service class from a utility class or a helper class? A class only with underlying methods calls the dao's is a service? Doesn't the usage of Helper ...
11
votes
4answers
544 views

Avoiding bloated Domain Objects

We're trying to move data from our bloated Service layer into our Domain layer using a DDD approach. We currently have a lot of business logic in our services, which is spread out all over the place ...
3
votes
1answer
261 views

How a .NET dev team should be designing and delivering greenfield projects? [closed]

Some of the hottest topics in the software world atm are: Domain-Driven Design SOLID principles Agile methodologies ORM Now assuming that you are not currently using all of these in your team, ...
6
votes
3answers
918 views

Duplication in parallel inheritance hierarchies

Using an OO language with static typing (like Java), what are good ways to represent the following model invariant without large amounts of duplication. I have two (actually multiple) flavours of the ...