vendredi 28 juillet 2017

Divide module into submodules in VIPER

Have read "Book of VIPER" by "Rambler&Co". There is a suggestion to use one module for one scene and that the modules can be custom and simple. For the custom (compound) modules they suggest divide them into sub-modules. For example, according to how many sections scene has. And they do also offer 5 approaches for the different cases:

  • Container
  • Scroll View Controller with a title, contact, attachment, body submodules etc.
  • Table with a section submodules
  • Table with a cell-submodules
  • View-submodules

Seems clear in theory but what's about realization? How does it should look like? Let's say if i do have a table(module) with 2 sections and would like to divide each section into submodule? How does it look in code? Should i use additional folders (don`t think so) for each submodule or is it just on the level of code? Would appreciate the examples.

Aucun commentaire:

Enregistrer un commentaire