Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Obtain return from another module #12

Open
emenegro opened this issue Jan 27, 2015 · 0 comments
Open

[Question] Obtain return from another module #12

emenegro opened this issue Jan 27, 2015 · 0 comments

Comments

@emenegro
Copy link

I have a problem dealing with the return of some info from a module that had been presented by another module. In my case I have two modules, Map and Search. The MapView notifies that it wants to search an address, so the MapPresenter begins the actions to show the Search module. Inside the Search module I make a text search, obtain the results, show it and select one. That selection has to be returned to the Map module. How can I achieve that?

Taking into account, and please correct me if I'm wrong, that the communication inter-module has to be achieved only via routing (not jumping between modules with notifications, closures and so on), I implemented this scenario:

viper-flow-chart
(Sorry, maybe a sequence diagram would be better)

MapWireframe implements the regular interface but also another one I called MapModuleInput, so I pass to the SearchWireframe a MapWireframe implementing that interface when I begin the search action (blue).

After that, in the red flow, in the SearchView I begin the search case, it obtains the results from the interactor, etc. After that the results are presented and the user selects one (green), so the selected result is returned to the map via the MapModuleInput interface.

So, is that correct?

Thank you!

@emenegro emenegro changed the title Obtain return from another module [Question] Obtain return from another module Jan 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant