绿色机器人EventBus和番石榴EventBus的区别

时间:2022-04-16 20:46:24

I´ve been using quite often EventBus from greenrobot

经常我´一直使用EventBus greenrobot

https://github.com/greenrobot/EventBus

https://github.com/greenrobot/EventBus

But I´ve just realised that Guava has its own EventBus

´但我刚意识到,番石榴有自己的EventBus

com.google.common.eventbus.EventBus

com.google.common.eventbus.EventBus

Does someone know if there are big differences?

有人知道有什么大的不同吗?

3 个解决方案

#1


9  

Both are excellent quality library.

两者都是优质的图书馆。

Here is a comparison (from greenrobot developpers point of view) between greenrobot EventBus and Otto (a fork from Guava specialized for android).

下面是greenrobot EventBus和Otto (android专用于番石榴)之间的对比(从greenrobot development pers的观点来看)。

I personnaly like EventBus because it support delivery in background threads

我个人喜欢EventBus,因为它支持在后台线程中交付

#2


4  

No more need to compare where otto is deprecated and writes a note:

不再需要比较反对奥托的地方并写一个说明:

This project is deprecated in favor of RxJava and RxAndroid.

该项目已弃用,支持RxJava和RxAndroid。

#3


2  

EventBus can do some Android specific tricks, which other implementations don't support. First, there is main thread support to conveniently switch threads.Second its performance was optimized especially for Android. For example, with EventBus 3 you get annotations without the performance downgrade you would have with Otto or Guava.

EventBus可以执行一些Android特定的技巧,而其他实现不支持这些技巧。首先,有主线程支持,方便地切换线程。其次,它的性能得到了优化,特别是针对Android。例如,使用EventBus 3,您可以得到注释,而不会降低奥托或番石榴的性能。

#1


9  

Both are excellent quality library.

两者都是优质的图书馆。

Here is a comparison (from greenrobot developpers point of view) between greenrobot EventBus and Otto (a fork from Guava specialized for android).

下面是greenrobot EventBus和Otto (android专用于番石榴)之间的对比(从greenrobot development pers的观点来看)。

I personnaly like EventBus because it support delivery in background threads

我个人喜欢EventBus,因为它支持在后台线程中交付

#2


4  

No more need to compare where otto is deprecated and writes a note:

不再需要比较反对奥托的地方并写一个说明:

This project is deprecated in favor of RxJava and RxAndroid.

该项目已弃用,支持RxJava和RxAndroid。

#3


2  

EventBus can do some Android specific tricks, which other implementations don't support. First, there is main thread support to conveniently switch threads.Second its performance was optimized especially for Android. For example, with EventBus 3 you get annotations without the performance downgrade you would have with Otto or Guava.

EventBus可以执行一些Android特定的技巧,而其他实现不支持这些技巧。首先,有主线程支持,方便地切换线程。其次,它的性能得到了优化,特别是针对Android。例如,使用EventBus 3,您可以得到注释,而不会降低奥托或番石榴的性能。