Etsy Michael MacDougall Dec 11, 2017

VIPER Architecture on iOS at Etsy

Article Summary

Michael MacDougall from Etsy reveals how they tackled iOS architecture chaos with VIPER. The overhead was brutal, but the consistency payoff changed everything.

Etsy's iOS team was struggling with inconsistent development patterns that made jumping between projects difficult. They adopted VIPER architecture despite its steep learning curve, then built VIPERBuilder to solve the boilerplate problem.

Key Takeaways

Critical Insight

Etsy standardized iOS development with VIPER, then created VIPERBuilder to make the architecture practical at scale across multiple production features.

The article walks through a concrete example showing exactly how data flows through all five VIPER layers.

About This Article

Problem

Etsy's iOS developers struggled with VIPER's learning curve and architectural complexity. The pattern required many class references, and weak references had to be handled carefully to avoid retain cycles.

Solution

Michael MacDougall's team built VIPERBuilder, a framework that uses Swift generics to automatically wire together Interactor, Presenter, and Router base classes. This eliminated the tedious boilerplate code developers had to write by hand.

Impact

Etsy shipped four major production features using VIPER and VIPERBuilder: shop stats, multi-shop checkout, search, and the seller dashboard. The approach scaled across their iOS team.