Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3678780
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:22:56+00:00 2026-05-19T03:22:56+00:00

When implementing Domain events should the event handlers be only used for purely domain

  • 0

When implementing Domain events should the event handlers be only used for purely domain concerns; something that you would discuss with the business experts, or are they open to be used by anything that has an interest in the domain model?

This is most probably best explained with a simple example, consider a Calendar application for scheduling work to employees.

We might have the following domain events…

AppointmentAdded
AppointmentRemoved
AppointmentContentChanged
AppointmentMoved

We have handlers for these events, for example when an Appointment is moved to a time outside of the employees working hours we set a warning flag.

There are of course application concerns that are interested in these events, e.g. when an Appointment is added to the calendar, we should add it to the Unit of Work so we can commit the changes later.

Should these application concerns be consumers of the domain events, or should we raise and handle separate system events instead?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T03:22:57+00:00Added an answer on May 19, 2026 at 3:22 am

    There are 2 well established ways of using events in a DDD solution.

    The first one is based on Udi Dahan’s articles about events. If you haven’t read them already, I highly recommend that. In summary it says that you publish your events using static class in addition to normal ORM-style behavior. So you add an order to customer’s order collection and you publish the event. Because your domain behavior is executed inside a transaction scope, so are event handlers. You could also find there and advice not to manually attach objects to a Unit of Work. New aggregate roots should be created by invoking behavior on existing ones.

    There is another option which is promoted by Greg Young. It is based on event sourcing which basically is using events as means of persisting state. In this approach your aggregate roots usually use some infrastructure (e.g. base aggregate root class) to apply events. Apply does invoke an event handler on aggregate root class and publishes this event on a bus (whatever bus implementation you use).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Implementing a custom membership provider, there are certain properties such as MinRequiredPasswordLength that only
I'm thinking of implementing a Domain Driven Design approach (similar to the one described
I am implementing CodeMirror ( http://marijn.haverbeke.nl/codemirror/ ) on a page where document.domain needs to
I have a model that requires a valid format of a URL. class Event
We are implementing a SOA-architecture the Udi Dahan way, which means that services are
I am looking at implementing a paging strategy for a domain model which has
Implementing a low pass FIR filter, when should one use FFT and IFFT instead
I'm looking for recommendations on best practices when implementing equality in a domain model.
I was recently tasked on implementing a buffer which will be used as a
I'm currently implementing a decentralized DNS, and am wondering if a domain name character

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.