All Projects → spinettaro → Delphi Event Bus

spinettaro / Delphi Event Bus

Licence: apache-2.0
Delphi Event Bus (for short DEB) is an Event Bus framework for Delphi

Programming Languages

pascal
1382 projects
delphi
115 projects

Labels

Projects that are alternatives of or similar to Delphi Event Bus

ReactiveBus
🚍 Reactive Event Bus for JVM (1.7+) and Android apps built with RxJava 2
Stars: ✭ 17 (-93.36%)
Mutual labels:  eventbus
eventbus
A threadsafe C++ implementation of the EventBus idiom
Stars: ✭ 27 (-89.45%)
Mutual labels:  eventbus
rxbus2
Listen and handle event ,based on RxJava.
Stars: ✭ 32 (-87.5%)
Mutual labels:  eventbus
e
A library which combines a eventBus/emitter, DOM events management, delegated events, and event-based utils into a single lightweight and performant library.
Stars: ✭ 37 (-85.55%)
Mutual labels:  eventbus
reacted
Actor based reactive java framework for microservices in local and distributed environment
Stars: ✭ 17 (-93.36%)
Mutual labels:  eventbus
event
An event bus.
Stars: ✭ 20 (-92.19%)
Mutual labels:  eventbus
mvp4g
A framework to build a gwt application the right way
Stars: ✭ 29 (-88.67%)
Mutual labels:  eventbus
Multiplatform-Bus
Kotlin event-bus compatible with Android & native iOS
Stars: ✭ 43 (-83.2%)
Mutual labels:  eventbus
react-native-event-bus
Event bus for react native, cross-interface communication solution, it works on iOS and Android.
Stars: ✭ 48 (-81.25%)
Mutual labels:  eventbus
RXBus
RX based bus with lifecycle based queuing support
Stars: ✭ 53 (-79.3%)
Mutual labels:  eventbus
LiteBus
LiteBus is an easy-to-use and ambitious in-process mediator providing the foundation to implement CQS. It is implemented with minimum reflection usage and streamable query support.
Stars: ✭ 20 (-92.19%)
Mutual labels:  eventbus
ontology-eventbus
The Go Language Implementation of Ontology Actor Model
Stars: ✭ 24 (-90.62%)
Mutual labels:  eventbus
use-bus
React hook to subscribe and dispatch events accros React components
Stars: ✭ 51 (-80.08%)
Mutual labels:  eventbus
IpcEventBus
Faster than Intents and easier than AIDLs.
Stars: ✭ 35 (-86.33%)
Mutual labels:  eventbus
geeteventbus
An inprocess eventbus for highly concurrent Python applications
Stars: ✭ 17 (-93.36%)
Mutual labels:  eventbus
DelphiEventBus
Implementation of event bus pattern for Delphi XE
Stars: ✭ 32 (-87.5%)
Mutual labels:  eventbus
EventBus
💢 Nepxion EventBus is a generic event dispatching component based on Google Guava with Spring framework AOP, support synchronous and asynchronous mode 基于Google Guava通用事件派发机制的事件总线组件,注解式发布订阅
Stars: ✭ 65 (-74.61%)
Mutual labels:  eventbus
eshopzero
.Net Microservice Application
Stars: ✭ 27 (-89.45%)
Mutual labels:  eventbus
android-blog-samples
source code for my blog~
Stars: ✭ 32 (-87.5%)
Mutual labels:  eventbus
eventbus-plugin
IntelliJ iDEA plugin to work with projects using greenrobot's EventBus library
Stars: ✭ 25 (-90.23%)
Mutual labels:  eventbus

alt text

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.

alt text

Give it a star

Please "star" this project in GitHub! It costs nothing but helps to reference the code

alt text

Features

  • 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

Events

1.Define events:

IEvent = interface(IInterface)
['{3522E1C5-547F-4AB6-A799-5B3D3574D2FA}']
// additional information here
end;

2.Prepare subscribers:

  • Declare your subscribing method:
[Subscribe]
procedure OnEvent(AEvent: IAnyTypeOfEvent);
begin
  // manage the event 	
end;
  • Register your subscriber:
GlobalEventBus.RegisterSubscriberForEvents(Self);

3.Post events:

GlobalEventBus.post(LEvent);

Channels

1.Define channel:

const MY_CHANNEL = 'MYCHANNEL'

2.Prepare subscribers:

  • Declare your subscribing method:
[Channel(MY_CHANNEL)]
procedure OnMessage(AMsg: string);
begin
  // manage the message 	
end;
  • Register your subscriber:
GlobalEventBus.RegisterSubscriberForChannels(Self);

3.Post event on channel:

GlobalEventBus.post(MY_CHANNEL, 'My Message');

Support

  • DEB is a 100% ObjectPascal framework so it works on VCL and Firemonkey
  • It works with Delphi2010 and major

Release Notes

DEB 2.0

  • NEW! Added new Interface based mechanism to declare and handle events!
  • NEW! Added channels for simple string-based events
  • NEW! Removed internal CloneEvent because now events are interface based!

Breaking Changes

  • A subscriber method can only have 1 parameter that is an IInterface or descendants
  • EventBus.Post method can accept only an interface as parameter now

License

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

http://www.apache.org/licenses/LICENSE-2.0

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].