Last year, the iOS development department of Rambler & Co collected all the instructions, best practices and tips on using the VIPER architectural approach. The whole, as usual, turned out to be larger than the sum of all its components - and the output was an excellent book. And now we are ready to present its first edition !
The iOS development department at Rambler & Co began, in fact, with four people. For the first year, the department has grown four times. A year later we were twenty-five. In parallel, we are developing more than ten projects, and quite diverse - an email application, a client for a blog platform, and 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 an architectural approach such as VIPER . VIPER helped us both in solving administrative tasks - a uniform approach to architecture allowed us to switch people between different projects with almost no pain 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 of each other, affected the rest of the code, and a clear decomposition of the UIViewController
into layers helped in the issue of increasing code coverage with tests.
Of course, the introduction of VIPER in our projects took place gradually. The main problem we faced 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 module components, but did not answer the more complex questions: “how to switch from one module to another” , “how to implement the composition of modules” , “where to write common business logic” .
Any empty niche will ever be filled, and we decided to take on this particular task. Every time, when we faced any VIPER question, we gathered a close group of interested people, argued fiercely, wrote down the marker boards, and eventually came to a common decision. The results of our disputes were recorded - and as a result they turned into a series of reports about the use of VIPER and our book.
Book VIPER can be divided into three parts: theoretical, practical and applications.
As you can see, the pronoun "we" is used throughout the article - and this is not accidental. The creation of this book is the fruit of the work of labor of not one person, but our entire team and a large number of external contributors. Almost all chapters are written by different people, who, nevertheless, have common views on the construction of mobile application architecture. All the 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 the VIPER Book 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 in Issues .
Source: https://habr.com/ru/post/311248/
All Articles