Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Learn How To Build Decoupled Delphi Applications Quickly With Delphi Event Bus Framework

Modularity is very important in software architecture so that applications built can be easily extendable and maintainable. Consider your building an application with multiple components in it. If we decide to remove a component and replace it with another component it should not affect the application. This can be done by decoupling software architecture. Do you want to build such decoupled applications in Delphi? This post guide you to build using Delphi Event Bus Framework.

EventBus: An event bus allows publish/subscribe-style communication between components without requiring the components to explicitly be aware of each other. Looks like Observer Pattern? No, there is a difference. In the observer pattern, the broadcast is performed directly from the observable to the observers, so they “know” each other. But when using a publish/subscribe pattern, there is a third component, called event bus, which is known by both the publisher and subscriber. It is Decoupled between Publisher and Subscriber.

Delphi Event Bus allows you to decouple components that asynchronously receive and process events and or emit events. Consumers can subscribe to this event bus and declaratively specify which events they wish to consume. The event consumer a publisher is completely decoupled. Simplifies the communication between components.

Delphi Event Bus Features:

How it works :

[crayon-6759ffeb5950a543069898/] [crayon-6759ffeb59513929952309/] [crayon-6759ffeb59516772129493/] [crayon-6759ffeb59517103549352/]

Check this below video for Demonstration of How the Delphi Event Bus Framework(DEB) works.

Delphi Event Bus Demonstration

Checkout the full source code for Delphi Event framework here.


Exit mobile version