EventBus is a design pattern which allows publish-subscribe style communication without requiring components to registering with each other. Most of the android developers have used a library for
EventBus. EventBus by Greenrobot is a pretty famous library and widely used. It was quite impressive how you could send any object and the subuscriber would receive it without any hassles.
Kotlin has been on the rise since past couple of years, especially for android app development. I also started learning the language by making an app. I required
EventBus so I thought of implementing it myself in Kotlin with the help of Rx (RxKotlin) and it turned out to be super short and quite easy.
That’s it! It’s that simple. And this is how I use it.
It means to make something, which is abstract, concrete or real. When we need to access the type passed in the parameter, we can use
reified type parameters which gives us run-time access to types passed to the function. Read more about it - reified specs.
Redux architecture for android apps
What is Redux architecture? Learn about Redux and how to use it in your android app. Update your MVP/MVVM architecture to Redux and have a bug free app. Learn about actions, reducers, state management and redux store in-depth and write your own Redux implementation in Kotlin.