DEB an Event Bus framework for Delphi
Delphi Event Bus (for short DEB) is a publish/subscribe Event Bus framework for the Delphi platform.
DEB is designed to decouple different parts/layers of your application while still allowing them to communicate efficiently. It was inspired by EventBus framework for the Android platform.
- Easy and clean: DelphiEventBus is super easy to learn and use because it respects KISS and "Convention over configuration" design principles. By using default TEventBus instance, you can start immediately to delivery and receive events
- Designed to decouple different parts/layers of your application
- Event Driven
- Attributes based API: Simply put the Subscribe attribute on your subscriber method you are able to receive a specific event
- Support different delivery mode: Specifying the TThreadMode in Subscribe attribute, you can choose to delivery the event in the Main Thread or in a Background ones, regardless where an event was posted. The EventBus will manage Thread synchronization
- Unit Tested
- Thread Safe
Show me the code
TEvent = class(TObject) // additional information here end;
- Declare your subscribing method:
[Subscribe] procedure OnEvent(AEvent: TAnyTypeOfEvent); begin // manage the event end;
- Register your subscriber:
- DEB is a 100% ObjectPascal framework so it works on VCL and Firemonkey
- It works with Delphi2010 and major
Copyright 2016-2020 Daniele Spinetti
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.