title: Questions about VIPER - Clean Architecture
body: <p>I've been reading about <a href="https://vimeo.com/97530863">Clean Architecture</a> from Robert Martin and more specifically about <a href="http://www.objc.io/issue-13/viper.html">VIPER</a>.</p>
  
  <p>Then I ran into this article/post <a href="https://medium.com/brigade-engineering/brigades-experience-using-an-mvc-alternative-36ef1601a41f">Brigade’s Experience Using an MVC Alternative</a> which describes pretty much what I'm currently doing.</p>
  
  <p>After actually trying to implement VIPER on a new iOS project, I've ran into some questions:</p>
  
  <ul>
  <li>Is it ok for the presenter to query information in the view or should the "information passing" always start from the view?
  For example, if the view triggered some action in the presenter, but then, depending on the parameters passed through that action, the presenter might need more information.
  What I mean is: the user tapped “doneWithState:”, if state == “something”, get information from the view to create an entity, if state == “something else”, animate something in the view. How should I handle this kind of scenario?</li>
  <li>Lets say a "module" (group of VIPER components) decide to present another module modally. Who should be responsible for deciding if the second module will be presented modally, the first module's wireframe or the second module's wireframe?</li>
  <li>Also, lets say the second module's view is pushed into a navigation controller, how should the "back" action be handled? Should I manually set a "back" button with an action in the second module's view controller, that calls the presenter, that calls the second module's wireframe that dismiss and tells the first module's wireframe that it was dismissed so that the first module's view controller might want to display something?</li>
  <li>Should the different modules talk only through the wireframe or also via delegates between presenters? For example if the app navigated to a different module, but after that the user pressed "cancel" or "save" and that choice needs to go back and change something in the first module (maybe display an animation that it was saved or remove something).</li>
  <li>Lets say a pin was selected on a map, than the PinEditViewController is displayed. When going back, the selected pin's color might need to change depending on use actions on the PinEditViewController. Who should keep the state of the current selected pin, the MapViewController, the MapPresenter or the MapWireframe in order for me to know, when going back, which pin should change color?</li>
  </ul>