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

Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
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
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
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
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
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
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
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
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
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
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 

Recently uploaded (20)

Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
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🔝
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
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
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
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)
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
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...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
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...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 

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