Avengers icon indicating copy to clipboard operation
Avengers copied to clipboard

Multiple Subscriber/UseCases on one Presenter

Open lurecas opened this issue 9 years ago • 1 comments

Hi!

First of all, I want to thank you for sharing this project and the blog post about it. It's great to see working examples, detailed and explained thoroughly.

I've been also reading a lot on Clean Architecture and I'm interested on implement my projects with that architecture in mind. Also the Reactive approach could save us from a lot of callback hell and it has much more sense on some parts of an application.

I think I stumbled with the same thing as you, regarding the issue of having two UseCase (reactive) on the same presenter. On the AvengerDetailPresenter (https://github.com/saulmm/Avengers/blob/master/app/src/main/java/saulmm/avengers/mvp/presenters/AvengerDetailPresenter.java#L67) you are about to call two methods that will return an observable each.

What are you planning to do? I've been thinking about it and having two inner method subscribers doesn't seem right, but I'm stuck on that.

Thanks!!

lurecas avatar May 19 '15 10:05 lurecas

I want to hop on this conversation. I have a slight issue on the UseCase in general that being because they return a Subscription there isn't a way to extend or reuse them. I wonder if it would be better to return an Observable that an extending class could perform additional transforms on.

nschwermann avatar May 26 '15 15:05 nschwermann