Questions tagged [domain-events]

130 questions
1
vote
1 answer

DDD Domain Events across Bounded contexts (on separate servers) and Dependency Injection for Event Handlers

What are the options or any best practice ways of doing cross-Bounded Context (BC) communication with Domain Events that can use Dependency Injection (DI) to create the Event Handlers in the receiving BC? The BC's are in the same LAN but on separate…
lko
  • 8,161
  • 9
  • 45
  • 62
1
vote
1 answer

Detach event listeners for domain events? or how to stop executing otherwise required post events on specific use-cases

So let's take the usual Order example. Assuming a rich domain model we have an Order.place() call. It seems the way to do additional tasks related to this action these days point to domain events. So let's say this call fires an "OrderPlaced" event.…
1
vote
1 answer

Using aggregates and Domain events with nosql storage

I'm wandering on DDD and NoSql field actually. I have a doubt now: i need to produce events from the aggregate and i would like to use a NoSql storage. But how can i be sure that events are saved on the storage AND the changes on the aggregate root…
1
vote
1 answer

Entity Framework and ADO.NET with Unit of Work pattern

We have a system built using Entity Framework 5 for creating, editing and deleting data but the problem we have is that sometimes EF is too slow or it simply isn't possible to use entity framework (Views which build data for tables based on users…
user351711
  • 3,171
  • 5
  • 39
  • 74
1
vote
2 answers

how to wire-in domain event handlers in multi-layer applications

So my question is very much related to this one: Entity persitance inside Domain Events using a repository and Entity Framework? EDIT: A much better discussion on the topic is also here: Where to raise persistence-dependent domain events - service,…
1
vote
1 answer

In what Layer should be the DomainEventHandler?

I want to use the Domain Events pattern presented by Udi Dhahan My application have the fallowing layers: UI -> Distrebuted Services -> Application Services -> Domain -> Data Layer. The Domain Layer is responsible for raising Domain Events. In What…
rantri
  • 161
  • 1
  • 8
1
vote
2 answers

Should I add item using repository pattern or a create event if I am using domain events?

I am trying to understand the Domain Event pattern illustrated by Udi Dahan with regard to adding new domain entities in a certain situation. Now normally with entities I would create them and then add them via repository. I assume I would still do…
0
votes
0 answers

Xstream attribute and implict collection ambiguity

Hope you are fine. Can you please help me to resolve my below problem. I have an xml element with attribute named as “value” which can have one value E.g. (1) below , but there can be another case which i can have it as a child element named as…
Satya K
  • 11
  • 1
0
votes
1 answer

How to ensure composite commands including persisting to db and dispatching events are atomic?

Good morning, in our project we have a REST controller looking like this (it's only pseudocode and not the exact case; here I am giving a simple example showing the overall concept): @Transactional public ResponesEntity compisiteCreate() { …
julew
  • 216
  • 3
  • 14
0
votes
1 answer

In domain driven design, can domain events (which should have no knowledge of infra) push view changes to the client?

I'm building a bookstore point of sale system, and trying to use layer architecture / DDD for the first time. Books are my aggregates, and DDD ensures that my books can only be created in such a way that the business rules around creation are…
0
votes
1 answer

Is event sourcing an overkill for simple incremental form updates?

I am working in a web app which implements backend in event sourcing. Event sourcing has given us great power to go back in time, run projections to get different types of reports. Also, we can potentially build our database from scratch by…
Mihir Bhende
  • 8,677
  • 1
  • 30
  • 37
0
votes
0 answers

NUnit Test Domain events

I used this for implementation domain events https://learn.microsoft.com/en-us/dotnet/architecture/microservices/microservice-ddd-cqrs-patterns/domain-events-design-implementation I have event, handle and transaction infrastructure for dispatch…
0
votes
2 answers

version of aggregate event sourcing

According to event sourcing. When a command is called, all events of a domain have to be stored. Per event, system must increase the version of an aggregate. My eventstore is something like this: (AggregateId, AggregateVersion, Sequence, Data,…
0
votes
1 answer

IMediatr with Autofac in Domain Objects DDD

I have set my Domain Model objects to be independent of any service and infrastructure logic. I am also using Domain Events to react to some changes in Domain Models. Now my problem is how to raise those events from the Domain Model objects…
Luka
  • 4,075
  • 3
  • 35
  • 61
0
votes
1 answer

DDD - domain service to store entity in not primary infrastructure

I am thinking about scenario in a way of Domain Driven design, where I have entity, lets say Cv (Curriculum vitae), which state is saved in database via repository. Now I need to store part of the Cv in another system (ElasticSearch), which is…
Mariyo
  • 486
  • 7
  • 15
1 2 3
8 9