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

Setup data on Interactor. #43

Closed
buguibu opened this issue Jun 8, 2017 · 2 comments
Closed

Setup data on Interactor. #43

buguibu opened this issue Jun 8, 2017 · 2 comments

Comments

@buguibu
Copy link

buguibu commented Jun 8, 2017

As i understand VIPER, the interaction is the only one data provider to the presenter, so the setup data should be injected onto it and retrieved by the presenter when showing the module.

Along with this and for not create another issue, I didn't´t get the key concept of DisplayData entity and on my work I'm omitting it.

@ferranabello
Copy link
Owner

Hi @buguibu, I'm not sure If I understood the first question. SetupView() is just a convenience method that I added in the presenter so you don't have write it if you don't want to. But this kind of entry point should be with really simple data. Thins like setupView(data: "James") or whatever. Then the presenter will implement there the logic to call the interactor and fetch the data that it needs.

Answer to the 2nd question:
DisplayData is just for static or really dummy data. Think for example in localized strings, colors, heights, widths, methods for calculating frames, things like that. It's very useful to keep your view really clean and simple. But, of course, we can think on having a module without this dependency.

@chrain
Copy link

chrain commented Feb 5, 2018

@ferranabello thank for this issure, i know DisplayData in Viperit what can do.

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

3 participants