Hacker News new | ask | show | jobs
by lnanek2 3620 days ago
Yes, that's pretty full of boilerplate, even for Java, which is notoriously boilerplate.

There are more established event buses in Android with simpler syntax, like greenrobot's: EventBus.getInstance().post(new LogEvent("v1", "v2"));

Seen here: http://greenrobot.org/eventbus/documentation/how-to-get-star...

You can have multiple event buses and other customization there as needed, but you have sensible defaults to keep code small most of the time too.

Square also has one called Otto. If you want a lot of syntax and Java rather than Android, you might as well go full streaming with the RxJava library.

1 comments

I think Otto is a fork, and simply an enhanced implementation of Guava's built-in EventBus
meanwhile Otto has become deprecated and the authors suggest going with RxAndroid