Questions tagged [domain-events]
130 questions
0
votes
1 answer
Domain event being executed after transaction completes. How to get the concrete type.
I wanted to publish a domain event after a transaction completes. So I have followed this article here:
http://www.jayway.com/2013/06/20/dont-publish-domain-events-return-them/ and also had a look at this SO post: Should I Pass a repository to a…

Cool Breeze
- 1,289
- 11
- 34
0
votes
2 answers
Domain Events require class or a topic?
Should domain events be dispatched according to event classes, or classes and a topic?
For example, I have the following event:
class UserRegisteredEvent implements INonTransactionalEvent{
public Timestamp: TTimestamp;
}
And an event manager,…

AdrianGW
- 143
- 1
- 8
0
votes
1 answer
How to handle two or more domainevents in c#?
In C# I have a scenario where in at least 2 places different domain events are raised and I want a single hander to handle them with the same code (other listeners may perform the event specific code).
With the handlers using the following…

stan4th
- 710
- 1
- 6
- 19
0
votes
1 answer
Mapping in Domain Driven Design
I'm currently trying to find a way to map from one object to another where the first one is a domain model and the other one is an object that represents the same thing, but for a completely different use. A simple example:
public class…

Acrotygma
- 2,531
- 3
- 27
- 54
0
votes
1 answer
Autofac Registration technique for this specific issue
I have this class:
public class AutofacEventContainer : IEventContainer
{
private readonly IComponentContext _context;
public AutofacEventContainer(IComponentContext context)
{
_context = context;
}
…

Sartorial
- 173
- 1
- 8
0
votes
1 answer
Breaking the "ubiquitous language" by having an IoC in Domain Model?
My question is about Udi's solution to domain events, particularly the class DomainEvents (see code below)
An excerpt from Udi's code. It lives domain model as a static class.
public static class DomainEvents
{
[ThreadStatic] //so that each…

Yorro
- 11,445
- 4
- 37
- 47
0
votes
1 answer
Injecting IOrderSender into domain object
I have been pondering this for a while. In general I try to stay away from injecting services into my domain, but I have this case:
I have an PurchaseOrder object. This order is sent to a supplier using some service (Email or webservice). After the…

cfs
- 1,304
- 12
- 30
0
votes
1 answer
Domain Events (Udi style) and trying to work around Service Layer pattern
I've a delicate problem regarding the fact that I have a working solution with AutoFac, CommonServiceLocator and Udi's Domain events (http://www.udidahan.com/2009/06/14/domain-events-salvation/).
I let Autofac set the ServiceProvider in MVC…

Magnus Backeus
- 2,242
- 17
- 24
0
votes
1 answer
when to use domain event?
In DDD, I'm wondering when should I use domain event? Is there any recommendation of situations suitable for using domain event? Is it only for case where eventually consistent is acceptable?
Let's say in a online store example with Product, Order,…

David N
- 133
- 2
- 4
0
votes
1 answer
Integrating DI container within domain layer. Domain events
Following the article: http://www.udidahan.com/2009/06/14/domain-events-salvation/
we can see that DomainEvents implemantation uses DI container
public static IContainer Container { get; set; }
and then
if(Container != null) {
foreach(var…

lexeme
- 2,915
- 10
- 60
- 125