Re: Domain Event Objects vs Standard Events

"Marco Paul [email protected] [domaindrivendesign]" <[email protected]> Wed, 27 May 2015 18:35:54 -0400
Newsgroups gmane.comp.programming.domain-driven-design
Message-ID <[email protected]>
Rikard

How are u raising your domain events from within your aggregate?

"The issue with this code (except static Bus.Publish) is that event is
> tied to the instance. Not sure when this would be useful."
> 

Not sure what u meant by this as domain events are always associated with an instance of a domain concept


Sent from my iPhone

> On May 27, 2015, at 6:11 PM, Rikard Pavelic [email protected] [domaindrivendesign] <[email protected]> wrote:
> 
> On 27 May 2015 12:10:32 -0700
> "[email protected] [domaindrivendesign]"
> <[email protected]> wrote:
> 
> > What's everyone opinion on using (assuming .NET) standard custom
> > events as opposed to the traditional DDD way (static domain publisher
> > class)? 
> 
> I use .NET events as extension point for aggregate root event
> replayability. But, can't say I'm loving the concept.
> Also, I would never say static domain event publisher is "traditional
> DDD", since I consider that one of the bigger antipatterns, at least
> when running on top of transactional DB.
> 
> > consignee.Created +=
> > (s, e) => deferred.Enlist(() => Bus.Publish(e));
> 
> The issue with this code (except static Bus.Publish) is that event is
> tied to the instance. Not sure when this would be useful.
> 
> Regards,
> Rikard
> 
> -- 
> Rikard Pavelic
> https://dsl-platform.com/
> http://templater.info/
>