aino-komal / mvp4g

Automatically exported from code.google.com/p/mvp4g
0 stars 0 forks source link

Presenter inject view interface (ReverseViewInterface) #85

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

//use Mvp4g configuration but inject the view interface 
@Presenter(View = IOneView.class) 
public class OnePresenter extends 
BasePresenter<OnePresenter.IOneView, ...>{ 
     public interface IOneView {...} 
     //No need for GIN injection 
} 

//Create GIN module to set the implementation like before: 
public class GinModule1 extends AbstractGinModule { 
        @Override 
        protected void configure() { 
                bind( IOneView.class ).to( IOneViewImpl1.class ); 
        } 
        ... 
} 

What is the expected output? What do you see instead?
I would expected that in the case I'm working with ReverseViews it should be 
enough that IOneViewImpl1.class implements ReverseViewInterface interface. But 
only in the case that IOneView implements the ReverseViewInterface  interface 
the presenter will be set by mvp4g correctly.  

What version of the product are you using? On what operating system?
1.3.1

Please provide any additional information below.

Original issue reported on code.google.com by rdeangel...@gmail.com on 31 May 2011 at 9:56

GoogleCodeExporter commented 9 years ago
The problem here is that mvp4g is not aware of the GIN configuration so it 
won't know that the instance of IOneView is IOneViewImpl1 at compile time.

Also, I think it's not an issue if IOneView extends ReverseViewInterface. You 
can either build your presenter to follow the regular MVP or reverse MVP so any 
view implementation will have to follow the pattern chosen for the presenter, 
that's why I think it's ok to have the view interface extends 
ReverseViewInterface. Do you have a case where this could be a problem?

Thanks

Original comment by plcoir...@gmail.com on 31 May 2011 at 2:25

GoogleCodeExporter commented 9 years ago
I also think that this is not a big issue and I can live with this restriction.
So I think we can close this issue ...

Only one thing: mvp4g is a great! You have done a good job!  

Original comment by rdeangel...@gmail.com on 1 Jun 2011 at 7:06

GoogleCodeExporter commented 9 years ago
Marked as invalid since it is working as intented.

Original comment by plcoir...@gmail.com on 5 Sep 2013 at 4:32