Event Aggregator Message System
EAMS is fast, reliable, type safe, productive and very very easy to use!
Every time any of your entities emits a signal that needs to be consumed by others entities, you are talking about EAMS!
Event Aggregator is a pattern that tries overcome the limitation of traditional event
handling approach by providing a central place to publish and subscribe for events
which is nothing but an Event Aggregator.
The Event Aggregator takes care for
registering, unregistering and invoking of events loosely coupling Publishers and
Subscribers. All Publishers and Subscribers of event will know only about the Event
Aggregator.
Traditional Event handling
The steps below describes Traditional Event Handling.
1. Publisher advertises its event(s) and specifies when they will be invoked.
2. A Subscriber will then register itself to Publisher event(s).
3. As Publisher object undergoes changes in its lifetime it will invoke the event
informing the Subscriber(s).
Disadvantages of Traditional Event handling
● If there are multiple Subscribers and Publishers then code become hard to
read and debug.
● The Subscriber of the event needs to know the Publisher of an event and
refer it directly by event names causing a tight coupling between them.
● The tight coupling will not allow Subscribers and Publishers to change
independently of each other.
● Its Subscriber responsibility to register and unregister from an event, its
seen many practical scenarios the subscriber typically forgets to unregister
causing both subscriber and publisher to be in memory causing memory
leaks.
Intent of Event Aggregator Pattern implemented by this package:
● Simplify subscribing and unsubscribing to events
● Decouple publishers from subscribers allowing both to change without affecting
the other.
● Makes it easy to add new events.
● Centralized handling of events.
*** All made simple for your use!***
Enjoy!