VIPER book


    TL; DR


    Last year, Rambler & Co’s iOS development department has been collecting all the instructions, best practices, and tips for using the VIPER architectural approach . The whole, as usual, turned out to be larger than the sum of all its components - and the result was an excellent book. And now we are ready to present its first edition !


    Download Links



    The iOS development department at Rambler & Co began essentially with four people. In the first year, the department grew four times. A year later, we were already twenty-five. In parallel, we are developing more than ten projects, and quite diverse - a mail application, a client for a blog platform, media projects. One of the most important tasks that we had to solve during the rapid growth phase was the standardization of application development approaches.


    The solution to this issue was such an architectural approach as VIPER . VIPER helped us both in solving administrative problems - a uniform approach to architecture made it possible to seamlessly switch people between different projects and easily integrate new employees, and in the matter of improving the quality of our projects - high modularity allowed us to develop modules completely independent from each other, the changes of which did not affected the rest of the code, and a clear decomposition UIViewControllerinto layers helped in the question of increasing the coverage of the code with tests.


    Of course, the introduction of VIPER in our projects took place gradually. The main problem that we encountered was the lack of a single knowledge base and practical examples. The Internet was full of simple examples of using this approach - authorization screens, task lists. These applications briefly showed the basic principles of the interconnection of the components of the module, but did not answer more complex questions: “how to move from one module to another” , “how to implement the composition of the modules” , “where to write the general business logic” .


    Any empty niche will ever be filled, and specifically we decided to take on this task. Each time, when confronted with a VIPER question, we would get together with a close group of interested people, argue fiercely, write down whiteboards and eventually come to a common solution. The results of our disputes were recorded - and in the end they turned into a series of reports about the use of VIPER and our book.



    The VIPER book can be conditionally divided into three parts: theoretical, practical and applications.


    • The theoretical part highlights the general structure of the module, both canonical and with our additions, the history of VIPER, issues of code generation and automation of module creation.
    • The practical part reveals the very secrets that other sources of information are silent about - transitions between screens, various options for composing modules, covering code with tests, VIPER integration with system components such as UIWebView and NSFetchedResultsController.
    • And the applications included our view of Code Style as part of the VIPER module and a selection of materials for further familiarization with the issue.

    As you can see, the entire pronoun uses the pronoun "we" - and this is no accident. The creation of this book is the result of the work of not one person, but our entire team and a large number of external contributors. Almost all the chapters are written by different people, who, nevertheless, have common views on building the architecture of mobile applications. All ideas and approaches proposed by us have been tested on dozens of diverse applications and are used by teams both in Russia and around the world.


    The first edition of VIPER was created using the GitBook service and is available in several formats at once:



    In addition, we are actively engaged in translating the book into other languages (asks a lot of people) and we will be grateful for the help in this process.


    If you have any questions, suggestions, or notice typos - write to us at Issues .


    Also popular now: