SlideShare a Scribd company logo
1 of 37
Download to read offline
Creating An App for 650
million customers
AnchorFree in Numbers
● 50M MAU, 650M total active
● Two Apps in Top 10 at US App Store
● 1 Petabyte of traffic per day
● 6+ Cross-platform Apps (iOS, Android, Desktop)
● 2+ acquired competitors
Different UI – similar features
What we had previously?
● The Good
○ Split repos per application
● The Bad
○ Dependency Hell
○ No Unified Architectural Approach (but mainly MVC)
● The Ugly
○ Low unit test coverage
○ Huge code duplication between repos
○ Broken CI for months in some repos
The Master Plan
The Master Plan
● Monorepo
● Unified architectural approach
● Stable CI
● Unit-test coverage
● Automated testing
Repositories
Split repos
● The Good
○ Bugs are isolated in application repo
○ Fast & Secure
● The Bad
○ Hard to reuse code
○ Hard to do a large-scale refactoring
● The Ugly
○ Dependency hell on large project
○ Same bugs in every single app
Monorepo
● The Good
○ Great code reuse & large-scale refactoring
○ Manageable dependencies
○ Easy release management
○ Cross-team collaboration
● The Ugly
○ Scalability challenges in CI & VCS
○ Tooling
Our Approach to VCS
● Git as VCS
● GitHub for repo management and
code-reviews
● Pull request naming policy
● Tags naming policy
● Squash-merge to keep git history clean
Our Approach to CI
● CircleCI as CI
● Tests on every PR
● Regular AdHoc releases of all apps
● Release-candidate builds from tags
● An eternal battle to keep builds fast
What we achieved with the monorepo?
● Consistent CI builds of all apps
● Lower regression rate
● Shorter release cycles due to code sharing
When a monorepo may work for you?
● Multiple similar projects in organization
● Poor code reuse between them
● Dependency hell
Unified Architecture
Our Goals
● Different UI design in different apps
● Easily replace system components per application
● Keep new architecture compatible with MVC
● Scale team easily
● Support macOS later
Common Approaches
● MVC
● MVVM (+Coordinator)
● VIPER
MVC
● The Good
○ Simple when the project is small
● The Bad
○ Learning curve for new team member when MVC becomes MVC+whatever
● The Ugly
○ Massive view controllers
○ Hard to unit-test view and controller
○ Team reinvents the wheel all the time
○ A/B tests are undoable
MVVM (+Coordinator)
● The Good:
○ Testability
○ Easy of use
● The Bad:
○ Massive ViewModels
○ Possible God-Object Coordinator
○ A/B testing
● The Ugly:
○ Call Stack during debugging
○ No standard approach to routing
VIPER
● The Good
○ Isolated modules → isolated bugs
○ Short learning curve → easy scale of the team
○ Unit testing is trivial
○ A/B testing of every app component is trivial
○ Standardized architectural approach → no reinvented wheels
● The Bad
○ Heavily missed deadlines at first
○ Lots of boilerplate code
Deadlines With VIPER
High Level Design of our Approach
Lessons Learned with VIPER
● Every VIPER is different
● It’s hard to make VIPER right from scratch
● Use codegen to avoid rewriting of boilerplate code
What we have now?
● The Good
○ Unified architectural approach
○ Low code duplication
○ CI builds of all apps
● The Bad
○ Monorepo with few apps
○ Latest versions of dependencies from git submodules
● The Ugly
○ Low Unit test coverage
Next Steps
1. Achieve better unit test coverage
2. Automate testing process
3. Update apps every 4-6 weeks
4. Build cross-functional teams based on functional blocks
5. Run tens of A/B tests in every release
6. Find the next big (product) thing
7. File the IPO
Let’s stay in touch
/dosipa
dima.osipa@gmail.com
bomjkolyadun
Q&A
https://anchorfree.com/openings/
Yes, we are hiring:
Backup Slides (VIPER)
Assembly
● PONSO – plain old NSObject
● Responsible for injecting dependencies into the module
View
● UIViewController (or NSViewController) subclass
● VIPER’s module facade (to achieve compatibility with MVC)
● Sends events to Presenter
● Receives ViewModels from Presenter
● Receives UIControls style from Theme
Theme
● Swift Enum / PONSO
● Contains styles of all UI Components of the app
Presenter
● PONSO
● Receives events from View
● Sends ViewModels to View
● Sends events to Interactor
● Receives data and events from Interactor
● Sends events to Router
Interactor
● PONSO
● Handles one use-case
● Presenter may contain few interactors
● Receives events from Presenter
● Sends events to Services
● Receives Entities and events from Services
Service
● PONSO
● Interacts with backend
● Manipulates with Entities
● Interactor may interact with one or more services
View Controller Extension
● Method to open ViewController – VIPER Module and inject dependencies
● Method to close ViewController – VIPER module
Why VIPER?
● Great component interchangeability
● Module Isolation
● Trivial Unit-tests
● Short learning curve for new team members
Typical Startup Problems
● How to attract new customers
● How to increase revenue per customer
● How to respond to the competition
● How to build a constant change culture
Let’s stay in touch
/dosipa
dima.osipa@gmail.com
bomjkolyadun

More Related Content

Similar to Creating An App for 650 million customers v.2.pdf

JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JSFestUA
 
Microservice Workshop Hands On
Microservice Workshop Hands On Microservice Workshop Hands On
Microservice Workshop Hands On Ram G Suri
 
Effects, Coeffects & Subscriptions: a pit of success for SPAs
Effects, Coeffects & Subscriptions: a pit of success for SPAsEffects, Coeffects & Subscriptions: a pit of success for SPAs
Effects, Coeffects & Subscriptions: a pit of success for SPAsManuel Rivero
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendVlad Fedosov
 
Introduction to Continuous Integration
Introduction to Continuous IntegrationIntroduction to Continuous Integration
Introduction to Continuous IntegrationHùng Nguyễn Huy
 
Go Pro, Inc. Case Study: Dive into the details of our node.js applications
Go Pro, Inc. Case Study: Dive into the details of our node.js applicationsGo Pro, Inc. Case Study: Dive into the details of our node.js applications
Go Pro, Inc. Case Study: Dive into the details of our node.js applicationsAndrew Maxwell
 
Delivering Best Apps with Efficiency
Delivering Best Apps with EfficiencyDelivering Best Apps with Efficiency
Delivering Best Apps with EfficiencyWSO2
 
The Modern Web with Microfrontends
The Modern Web with MicrofrontendsThe Modern Web with Microfrontends
The Modern Web with MicrofrontendsNikki Dingding
 
Cloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud PipelinesCloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud PipelinesLars Rosenquist
 
Cloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud PipelinesCloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud PipelinesLars Rosenquist
 
Jenkins and visual regression – Exove
Jenkins and visual regression – ExoveJenkins and visual regression – Exove
Jenkins and visual regression – ExoveExove
 
Continuous delivery in practice (public)
Continuous delivery in practice (public)Continuous delivery in practice (public)
Continuous delivery in practice (public)Tzach Zohar
 
Lagom : Reactive microservice framework
Lagom : Reactive microservice frameworkLagom : Reactive microservice framework
Lagom : Reactive microservice frameworkFabrice Sznajderman
 
The journey to Native Cloud Architecture & Microservices, tracing the footste...
The journey to Native Cloud Architecture & Microservices, tracing the footste...The journey to Native Cloud Architecture & Microservices, tracing the footste...
The journey to Native Cloud Architecture & Microservices, tracing the footste...Mek Srunyu Stittri
 
Feature Development with jQuery
Feature Development with jQueryFeature Development with jQuery
Feature Development with jQueryMichael Edwards
 
Effects, coeffects & subscriptions: a pit of success for SPAs Socracan18
Effects, coeffects & subscriptions: a pit of success for SPAs Socracan18Effects, coeffects & subscriptions: a pit of success for SPAs Socracan18
Effects, coeffects & subscriptions: a pit of success for SPAs Socracan18Manuel Rivero
 
InterCon 2016 - SLA vs Agilidade: uso de microserviços e monitoramento de cloud
InterCon 2016 - SLA vs Agilidade: uso de microserviços e monitoramento de cloudInterCon 2016 - SLA vs Agilidade: uso de microserviços e monitoramento de cloud
InterCon 2016 - SLA vs Agilidade: uso de microserviços e monitoramento de cloudiMasters
 
Angular meetup 2 2019-08-29
Angular meetup 2   2019-08-29Angular meetup 2   2019-08-29
Angular meetup 2 2019-08-29Nitin Bhojwani
 

Similar to Creating An App for 650 million customers v.2.pdf (20)

JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
 
Angular vs react
Angular vs reactAngular vs react
Angular vs react
 
Microservice Workshop Hands On
Microservice Workshop Hands On Microservice Workshop Hands On
Microservice Workshop Hands On
 
Effects, Coeffects & Subscriptions: a pit of success for SPAs
Effects, Coeffects & Subscriptions: a pit of success for SPAsEffects, Coeffects & Subscriptions: a pit of success for SPAs
Effects, Coeffects & Subscriptions: a pit of success for SPAs
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
 
Introduction to Continuous Integration
Introduction to Continuous IntegrationIntroduction to Continuous Integration
Introduction to Continuous Integration
 
Go Pro, Inc. Case Study: Dive into the details of our node.js applications
Go Pro, Inc. Case Study: Dive into the details of our node.js applicationsGo Pro, Inc. Case Study: Dive into the details of our node.js applications
Go Pro, Inc. Case Study: Dive into the details of our node.js applications
 
Delivering Best Apps with Efficiency
Delivering Best Apps with EfficiencyDelivering Best Apps with Efficiency
Delivering Best Apps with Efficiency
 
The Modern Web with Microfrontends
The Modern Web with MicrofrontendsThe Modern Web with Microfrontends
The Modern Web with Microfrontends
 
Cloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud PipelinesCloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud Pipelines
 
Cloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud PipelinesCloud Native CI/CD with Spring Cloud Pipelines
Cloud Native CI/CD with Spring Cloud Pipelines
 
Using Node.js to Build for the Enterprise
Using Node.js to Build for the EnterpriseUsing Node.js to Build for the Enterprise
Using Node.js to Build for the Enterprise
 
Jenkins and visual regression – Exove
Jenkins and visual regression – ExoveJenkins and visual regression – Exove
Jenkins and visual regression – Exove
 
Continuous delivery in practice (public)
Continuous delivery in practice (public)Continuous delivery in practice (public)
Continuous delivery in practice (public)
 
Lagom : Reactive microservice framework
Lagom : Reactive microservice frameworkLagom : Reactive microservice framework
Lagom : Reactive microservice framework
 
The journey to Native Cloud Architecture & Microservices, tracing the footste...
The journey to Native Cloud Architecture & Microservices, tracing the footste...The journey to Native Cloud Architecture & Microservices, tracing the footste...
The journey to Native Cloud Architecture & Microservices, tracing the footste...
 
Feature Development with jQuery
Feature Development with jQueryFeature Development with jQuery
Feature Development with jQuery
 
Effects, coeffects & subscriptions: a pit of success for SPAs Socracan18
Effects, coeffects & subscriptions: a pit of success for SPAs Socracan18Effects, coeffects & subscriptions: a pit of success for SPAs Socracan18
Effects, coeffects & subscriptions: a pit of success for SPAs Socracan18
 
InterCon 2016 - SLA vs Agilidade: uso de microserviços e monitoramento de cloud
InterCon 2016 - SLA vs Agilidade: uso de microserviços e monitoramento de cloudInterCon 2016 - SLA vs Agilidade: uso de microserviços e monitoramento de cloud
InterCon 2016 - SLA vs Agilidade: uso de microserviços e monitoramento de cloud
 
Angular meetup 2 2019-08-29
Angular meetup 2   2019-08-29Angular meetup 2   2019-08-29
Angular meetup 2 2019-08-29
 

Recently uploaded

Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutionsmonugehlot87
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?Watsoo Telematics
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 

Recently uploaded (20)

Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
buds n tech IT solutions
buds n  tech IT                solutionsbuds n  tech IT                solutions
buds n tech IT solutions
 
What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?What are the features of Vehicle Tracking System?
What are the features of Vehicle Tracking System?
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 

Creating An App for 650 million customers v.2.pdf

  • 1. Creating An App for 650 million customers
  • 2. AnchorFree in Numbers ● 50M MAU, 650M total active ● Two Apps in Top 10 at US App Store ● 1 Petabyte of traffic per day ● 6+ Cross-platform Apps (iOS, Android, Desktop) ● 2+ acquired competitors
  • 3. Different UI – similar features
  • 4. What we had previously? ● The Good ○ Split repos per application ● The Bad ○ Dependency Hell ○ No Unified Architectural Approach (but mainly MVC) ● The Ugly ○ Low unit test coverage ○ Huge code duplication between repos ○ Broken CI for months in some repos
  • 6. The Master Plan ● Monorepo ● Unified architectural approach ● Stable CI ● Unit-test coverage ● Automated testing
  • 8. Split repos ● The Good ○ Bugs are isolated in application repo ○ Fast & Secure ● The Bad ○ Hard to reuse code ○ Hard to do a large-scale refactoring ● The Ugly ○ Dependency hell on large project ○ Same bugs in every single app
  • 9. Monorepo ● The Good ○ Great code reuse & large-scale refactoring ○ Manageable dependencies ○ Easy release management ○ Cross-team collaboration ● The Ugly ○ Scalability challenges in CI & VCS ○ Tooling
  • 10. Our Approach to VCS ● Git as VCS ● GitHub for repo management and code-reviews ● Pull request naming policy ● Tags naming policy ● Squash-merge to keep git history clean
  • 11. Our Approach to CI ● CircleCI as CI ● Tests on every PR ● Regular AdHoc releases of all apps ● Release-candidate builds from tags ● An eternal battle to keep builds fast
  • 12. What we achieved with the monorepo? ● Consistent CI builds of all apps ● Lower regression rate ● Shorter release cycles due to code sharing
  • 13. When a monorepo may work for you? ● Multiple similar projects in organization ● Poor code reuse between them ● Dependency hell
  • 15. Our Goals ● Different UI design in different apps ● Easily replace system components per application ● Keep new architecture compatible with MVC ● Scale team easily ● Support macOS later
  • 16. Common Approaches ● MVC ● MVVM (+Coordinator) ● VIPER
  • 17. MVC ● The Good ○ Simple when the project is small ● The Bad ○ Learning curve for new team member when MVC becomes MVC+whatever ● The Ugly ○ Massive view controllers ○ Hard to unit-test view and controller ○ Team reinvents the wheel all the time ○ A/B tests are undoable
  • 18. MVVM (+Coordinator) ● The Good: ○ Testability ○ Easy of use ● The Bad: ○ Massive ViewModels ○ Possible God-Object Coordinator ○ A/B testing ● The Ugly: ○ Call Stack during debugging ○ No standard approach to routing
  • 19. VIPER ● The Good ○ Isolated modules → isolated bugs ○ Short learning curve → easy scale of the team ○ Unit testing is trivial ○ A/B testing of every app component is trivial ○ Standardized architectural approach → no reinvented wheels ● The Bad ○ Heavily missed deadlines at first ○ Lots of boilerplate code
  • 21. High Level Design of our Approach
  • 22. Lessons Learned with VIPER ● Every VIPER is different ● It’s hard to make VIPER right from scratch ● Use codegen to avoid rewriting of boilerplate code
  • 23. What we have now? ● The Good ○ Unified architectural approach ○ Low code duplication ○ CI builds of all apps ● The Bad ○ Monorepo with few apps ○ Latest versions of dependencies from git submodules ● The Ugly ○ Low Unit test coverage
  • 24. Next Steps 1. Achieve better unit test coverage 2. Automate testing process 3. Update apps every 4-6 weeks 4. Build cross-functional teams based on functional blocks 5. Run tens of A/B tests in every release 6. Find the next big (product) thing 7. File the IPO
  • 25. Let’s stay in touch /dosipa dima.osipa@gmail.com bomjkolyadun
  • 28. Assembly ● PONSO – plain old NSObject ● Responsible for injecting dependencies into the module
  • 29. View ● UIViewController (or NSViewController) subclass ● VIPER’s module facade (to achieve compatibility with MVC) ● Sends events to Presenter ● Receives ViewModels from Presenter ● Receives UIControls style from Theme
  • 30. Theme ● Swift Enum / PONSO ● Contains styles of all UI Components of the app
  • 31. Presenter ● PONSO ● Receives events from View ● Sends ViewModels to View ● Sends events to Interactor ● Receives data and events from Interactor ● Sends events to Router
  • 32. Interactor ● PONSO ● Handles one use-case ● Presenter may contain few interactors ● Receives events from Presenter ● Sends events to Services ● Receives Entities and events from Services
  • 33. Service ● PONSO ● Interacts with backend ● Manipulates with Entities ● Interactor may interact with one or more services
  • 34. View Controller Extension ● Method to open ViewController – VIPER Module and inject dependencies ● Method to close ViewController – VIPER module
  • 35. Why VIPER? ● Great component interchangeability ● Module Isolation ● Trivial Unit-tests ● Short learning curve for new team members
  • 36. Typical Startup Problems ● How to attract new customers ● How to increase revenue per customer ● How to respond to the competition ● How to build a constant change culture
  • 37. Let’s stay in touch /dosipa dima.osipa@gmail.com bomjkolyadun