Re: Domain Event Objects vs Standard Events

"RĂ©nald VENANT-VALERY [email protected] [domaindrivendesign]" <[email protected]> Thu, 28 May 2015 08:43:53 +0200
Newsgroups gmane.comp.programming.domain-driven-design
Message-ID <CAAwYdwjur4Tu0wZjYRacpsXXSuiTpPkiGyduq0+7UyF+ZxfNxQ@mail.gmail.com>
Adopting an EA perspective for these types of questions is really useful. I

have been practicing this discipline for a few weeks, and this paradigm
offers the ability to understand at a finer level the problem we are trying
to solve, and, as a consequence, how to align the solution on the problem.
Thanks Remy.


2015-05-27 22:48 GMT+02:00 Remy Fannader [email protected]
[domaindrivendesign] <[email protected]>:


>
>
>
>    - The critical distinction is between actual (aka external) and
>    symbolic (aka internal) events. The former are associated with changes in
>    the state of actual objects or activities, including agents’ expectations. The
>    latter are associated with changes in symbolic representations of objects
>    or activities. Their mapping depends on synchronization requirements.
>
>
> https://caminao.wordpress.com/how-to-implement-symbolic-representations/patterns/functional-patterns/event-patterns/
> Remy.
>
>
>
> On 27 May 2015 at 21:10, [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)?
>>
>>
>> sure you are more tightly coupled, but I would think in most instances
>> the client of the domain model is the application layer and this type of
>> coupling is not very harmful. The application layer has enough knowledge
>> for the given use case on how to dispatch the events, in-process, on the
>> bus, in-line, etc.
>>
>>
>> I don't see many people talking about this approach and I was wondering
>> why? here is some pseudo-code i've been toying around with.
>>
>>
>>             Deferred deferred = new Deferred();
>>
>>
>>             Consignee consignee = new Consignee();
>>
>>
>>             consignee.Created +=
>>
>>                 (s, e) => deferred.Enlist(() => Bus.Publish(e));
>>
>>
>>             repository.Add(consignee);
>>
>>
>>             deferred.Continue();
>>
>>
>>
>>
>  
>