EventHub | Library

Tech Stack :
Organisation Logo

This project is inspired by EventBus for Android & Java. you can checkout their repository at this link.

This is a project that implements the Pub/Sub model in a decoupled architecture. It can be especially useful in situations where entities have there own life-cycle.

This architecture can be used to develop applications for Xamarin.Forms, Xamarin.Android, Xamarin.iOS. It helps in seamless communication between various parts of the respective application models.

Features

  • Attribute based API: Put the [EventSubscriber] attribute to your subscriber methods to mark it as a handler.
  • Good performance: It is optimized to dispatch events as soon as they posted.
  • Asynchronous event Delivery & Execution: All the event executions and delivery are asynchronous.
  • Event & Subscriber inheritance: In EventHub, the object oriented paradigm apply to event and subscriber classes. Let's say event class A is the superclass of B. Posted events of type B will also be posted to subscribers interested in A. Similarly the inheritance of subscriber classes are considered.
  • Main thread delivery: Using platform specific main thread invocation methods, you can also deliver UI changes to the application.
  • No 3rd party dependency: This is no Xamarin binding, thus no 3rd party dependency or binding difficulties.

Add EventHub to your Project

✨ ✨ The first stable version of the project 🎉

Documentation

Click this link to check the README.md

Future Scope

  1. Build time subscriber method template cache, so that run time performance stays unaffected.
  2. Assign batches for every event posted.
  3. Cancellation will depend on execution state of the batch.
  4. Priority based event posting.

RH

Made with ❤️ by Rupanjan
Cookie Settings
Copyright © 2021 Rupanjan Hari