Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 2.63 KB

introduction-to-viper.md

File metadata and controls

37 lines (24 loc) · 2.63 KB

VIPER - Architecture approach for application development(particularly iOS), based on the Clean Architecture by Robert C. Martin (Uncle Bob).

Clean Architecture

Main goals of VIPER:

  • Increase of test coverage for the Presentation level, usually built from Massive View Controllers.
  • Conform to the Single Responsibility Principle.

It is important to note that VIPER is not the list of rules and templates. It's the list of recommendations how to build flexible, testable and reusable architecture. We, the iOS Team of Rambler&Co, have adopted some canonical principles and formed our best practices for some cases.

VIPER looks difficult at first, especially for developers without the team work experiences on large projects. Because it requires to understand that application modules should be independent and have high test coverage. But, VIPER is helpful even for small applications.

Pros and cons of VIPER:

Pros:

  • Increase of testability for the application presentation layer.
  • Modules are independent from each other. It makes the separate development environment and increases the code reusability.
  • Main architecture approaches are defined. So it's much easier to add new developer into the team or move project to another team.

Cons:

  • Highly increases of the number of class in the project, as well as the complexity of creating the new module.
  • Some principles don't work with UIKit out of the box.
  • Lack of recommendations, best practices and complex application examples.

We'll cover each of these concepts in detail and focus on how to solve those problems through the book.

VIPER history timeline: