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

  • SEARCH
  • Home
  • 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 6331221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:01:19+00:00 2026-05-24T18:01:19+00:00

Ever since learned about using event aggregators to publish messages instead of using events

  • 0

Ever since learned about using event aggregators to publish messages instead of using events I’ve managed to most events in my code (minus the ones that connect WPF control properties to my code). The issue now is that it seems I’m really overloading my services with handlers. Cruising around GitHub I can see people implement event aggregators (seems to take on another name such as bus) and create a class to handle each type of message.

For example:

public class SomeHandler : IHandle<SomeMessage>
{
    private readonly IEventAggregator _eventAggregator;

    public SomeHandler(IEventAggregator eventAggregator)
    {
        _eventAggregator = eventAggregator;
        _eventAggregator.Subscribe(this);
    }

    public void Handle(SomeMessage message)
    {
        Console.WriteLine("Handled SomeMessage.");
    }
}

What’s the term used for this type of programming? I’d like to learn more about it.

  • 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-24T18:01:19+00:00Added an answer on May 24, 2026 at 6:01 pm

    It is specifically based on the classic Mediator Pattern:

    With the mediator pattern, communication between objects is encapsulated with a mediator object. Objects no longer communicate directly with each other, but instead communicate through the mediator. This reduces the dependencies between communicating objects, thereby lowering the coupling.

    Your specific code example appears to be using Caliburn Micro’s EventAggregator. Many current implementations of the Mediator Pattern are referred to as “Event Aggregators”, and are common components in MVVM Pattern libraries. It’s a messaging pattern.

    In terms of messaging patterns, the following book should be of interest:

    Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions

    Although it is more about using messaging for systems integration, than using messaging to decouple components within an application.

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

Sidebar

Related Questions

Ever since I learned about -j I've used -j8 blithely. The other day I
Ever since I started using Xcode, I've experienced extremely annoying problems with Code Sense
Ever since I started using .NET, I've just been creating Helper classes or Partial
Ever since the publication of Enterprise Integration Patterns people have been using the notation
Ever since I moved from VB6 to VB.NET somewhere in 2005, I've been using
Ever since Microsoft introduced sql-server version code-named Madison the massively parallel processing (MPP) has
Ever since reading Clean Code I have been trying to keep my code descriptive
Ever since I started using an ORM for my day to day data access.
Ever since I ported my game to Xbox with XNA the code that's supposed
Been running into a problem ever since I started using rvm to manage my

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.