SlideShare une entreprise Scribd logo
1  sur  49
Disrupting the Banking
Experience: Building a
Mobile-only Bank
Yann Del Rey
Teresa Ng
InfoQ.com: News & Community Site
Watch the video with slide
synchronization on InfoQ.com!
https://www.infoq.com/presentations/
mobile-only-bank
• Over 1,000,000 software developers, architects and CTOs read the site world-
wide every month
• 250,000 senior developers subscribe to our weekly newsletter
• Published in 4 languages (English, Chinese, Japanese and Brazilian
Portuguese)
• Post content from our QCon conferences
• 2 dedicated podcast channels: The InfoQ Podcast, with a focus on
Architecture and The Engineering Culture Podcast, with a focus on building
• 96 deep dives on innovative topics packed as downloadable emags and
minibooks
• Over 40 new content items per week
Purpose of QCon
- to empower software development by facilitating the spread of
knowledge and innovation
Strategy
- practitioner-driven conference designed for YOU: influencers of
change and innovation in your teams
- speakers and topics driving the evolution and innovation
- connecting and catalyzing the influencers and innovators
Highlights
- attended by more than 12,000 delegates since 2007
- held in 9 cities worldwide
Presented at QCon London
www.qconlondon.com
Easy on-boarding
Zero Fees
Instant Notifications
Public API - Open to all third party developers
Starling Marketplace
A marketplace for the best
products, solving money
problems
Insurance
FX
Connectivity
Where I spend
Mortgages
Other current
accounts
Loans
Investment
Starling Marketplace
Founded by Anne Boden 2014
2014
November: Early technical prototyping
2015
January: Starling raises $70M, started building the bank
2016
July: PRA grants Starling its bank
October: Testing Mastercard debit
November: Alpha testing consumer app
December: Processing direct debits
January: Starling becomes the 13th member to join Faster Payments2017
February: Launched Beta testing program
April: First ever Open Banking Hackathon
May: Public App Store launch
Summer: Apple & Google Pay, Spending Insights, Saving Goals
How we work
How we work
We have tried different variations:
• Feature teams
• Component teams
Team structure example
•The team:
•All the mobile developers
•Couple platform developers
•Experts:
•Product managers
•Designers
Our team structure
iOS Android Back end Product
managers
Designers
How do we decide who has to work on what?
Flow:
• Kanban board
• Product managers prioritise new work
• We as developers do our prioritisation
• Whoever is free and wants to work on it
How do we define the requirements?
•Whoever picked the feature, will help defining the feature
•Meetings are banned
•Communication is key
•starlingdevs.slack.com
Allows us to innovate
Our app architecture
Our app architecture
•Every design pattern has pros and cons
•Picking one depends on the context
•Iteration is key
MVC
•Pros: Good to quickly develop features, everyone knows
it
•Cons: Doesn’t work well for a big codebase
- Massive view controllers
- Not maintainable
- Hard to test
- Hard to reuse components
MVC with closures
Goal: Decrease view controllers size by decoupling the logic
•Pros: reduces each component responsibilities
•Cons: Still based on the MVC model
- Doesn’t solve our problem on the long term
- Closures are difficult to track
VIPER
View Presenter Interactor
Entity
Entity
Router
VIPER
Goal: Isolate each component into smaller pieces
•Pros: SOLID principles, easy to test, good for a large team
•Cons:
- Lots of files
- Boilerplate code
- Protocols everywhere
- Very difficult to iterate
VIPER with RxSwift
Goal: Reduce the number of files and boilerplate code
•What is RxSwift
•Remove protocols between interactor and presenter
Stores
Goal: Add reusability and decrease number of files
•Replace interactors by stores
•What is a Store
•Extract and centralise the network and data layers
View configuration
Goal: Increase readability and decrease boilerplate code
•What is a View configuration
•Clear representation of a view
•Remove Presenter - ViewController protocols
•Easy to test and reuse
View configuration example
View configuration example
Proof of address
View configuration example
View configuration example
What does it look like
Router Presenter
Stores
ViewControllers
View Configs
+
RxSwift
Protocols
Protocols
+
RxSwift
What does it look like
Testing
Oct 2016 

First commit to
the Android repo
March 2016
Work begins
on the iOS app
May 2017
Public release of
both apps
What do we need to test…
… with no QA team?
What do we need to test?
•What we don’t need to test:
•Network calls are covered by our Platform tests
•Utility Methods (date formatting, currency formatting
etc)
•Views, views, views
•Interaction with these views
Writing Tests
•Java - Mockito, assertJ
• Android - Espresso
• RxJava2 & Dagger2
Test All Views Are Visible
@Test
public void scrollAllSlides() {
// perform
activityRule.launchActivity(null);
// Wait until the layout is created
onView(withId(R.id.saving_intro_pager)).check(matches(isDisplayed()));
SavingIntroActivity.Slide[] slides = SavingIntroActivity.Slide.values();
for (int i = 0; i < slides.length; i++) {
onView(allOf(withId(R.id.saving_intro_slide_image), isCompletelyDisplayed()))
.check(matches(withImageResource(slides[i].image)));
onView(allOf(withId(R.id.saving_intro_slide_title), isCompletelyDisplayed()))
.check(matches(withText(slides[i].title)));
onView(allOf(withId(R.id.saving_intro_slide_description), isCompletelyDisplayed()))
.check(matches(withText(slides[i].description)));
onView(withId(R.id.saving_intro_pager)).perform(swipeLeft());
}
}
Testing Visibility of Views in Specific Scenarios
@Test
public void whenUnableToLoadMissingDataErrorIsDisplayed() throws Exception {
doThrow(new IOException("")).when(starlingStorage).loadMissingData();
activityTestRule.launchActivity(null);
verify(snackbarManager).show(any(), anyInt(), anyInt(), anyInt(), any());
verify(starlingStorage).loadMissingData();
// Retry button tries to reload data
onView(withText(getTargetContext().getString(R.string.button_retry)))
.perform(click());
verify(starlingStorage, times(2)).loadMissingData();
}
Running the Tests
•Unit tests can be run wherever
•Different strategy is required for UI tests
•UI tests need to cover:
•Fragmentation
•Usability
Exploring Options
? …
Anbox
…
…
Test Reporting
• Log the reason for failures
• Record all the UI tests
• Take screenshots of failures
Example of Reporting in Action
android.support.test.espresso.NoMatchingViewException: No views in
hierarchy found matching: with string from resource id:
<2131756434>[payments_add_payee] value: Add payee
View Hierarchy:
+>DecorView{id=-1, visibility=VISIBLE, width=600, height=1024, has-
focus=false, has-focusable=true, has-window-focus=true, is-
clickable=false, is-enabled=true, is-focused=false, is-focusable=false,
is-layout-requested=false, is-selected=false, layout-
params=WM.LayoutParams{(0,0)(fillxfill) ty=1 fl=#85810100 pfl=0x20000
wanim=0x1030465 needsMenuKey=2}, tag=null, root-is-layout-
requested=false, has-input-connection=false, x=0.0, y=0.0, child-
count=3}
|
……
@Test
public void testAddPayeeActivityLaunched() {
// given
when(payeeEntity.observeAll()).thenReturn(Flowable.empty());
Intents
.intending(activityOf(PayeeLookupActivity.class))
.respondWith(new Instrumentation.ActivityResult(RESULT_OK, null));
// perform
startActivity();
onView(withText(R.string.payments_add_payee)).perform(click());
// verify
Intents.intended(activityOf(PayeeLookupActivity.class));
}
Resolved by adding this to the test set-up:
Failed here
when(preferences.hasStarlingPayRequestIntroBeenShown())
.thenReturn(true);
How we can take this further
•Slackbot integration
•Concurrency
•Appium for application upgrade tests
To conclude…
•Stability of the app does not need to be sacrificed
•This is just a start
@StarlingDev
@StarlingBank
@DaProd_ (Yann)
@NovemberGave (Teresa)
Q & A
Watch the video with slide synchronization on
InfoQ.com!
https://www.infoq.com/presentations/mobile-
only-bank

Contenu connexe

Plus de C4Media

Plus de C4Media (20)

Shifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CDShifting Left with Cloud Native CI/CD
Shifting Left with Cloud Native CI/CD
 
CI/CD for Machine Learning
CI/CD for Machine LearningCI/CD for Machine Learning
CI/CD for Machine Learning
 
Fault Tolerance at Speed
Fault Tolerance at SpeedFault Tolerance at Speed
Fault Tolerance at Speed
 
Architectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep SystemsArchitectures That Scale Deep - Regaining Control in Deep Systems
Architectures That Scale Deep - Regaining Control in Deep Systems
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.js
 
Build Your Own WebAssembly Compiler
Build Your Own WebAssembly CompilerBuild Your Own WebAssembly Compiler
Build Your Own WebAssembly Compiler
 
User & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix ScaleUser & Device Identity for Microservices @ Netflix Scale
User & Device Identity for Microservices @ Netflix Scale
 
Scaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's EdgeScaling Patterns for Netflix's Edge
Scaling Patterns for Netflix's Edge
 
Make Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home EverywhereMake Your Electron App Feel at Home Everywhere
Make Your Electron App Feel at Home Everywhere
 
The Talk You've Been Await-ing For
The Talk You've Been Await-ing ForThe Talk You've Been Await-ing For
The Talk You've Been Await-ing For
 
Future of Data Engineering
Future of Data EngineeringFuture of Data Engineering
Future of Data Engineering
 
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and MoreAutomated Testing for Terraform, Docker, Packer, Kubernetes, and More
Automated Testing for Terraform, Docker, Packer, Kubernetes, and More
 
Navigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery TeamsNavigating Complexity: High-performance Delivery and Discovery Teams
Navigating Complexity: High-performance Delivery and Discovery Teams
 
High Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in AdtechHigh Performance Cooperative Distributed Systems in Adtech
High Performance Cooperative Distributed Systems in Adtech
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/await
 
Opportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven UtopiaOpportunities and Pitfalls of Event-Driven Utopia
Opportunities and Pitfalls of Event-Driven Utopia
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
 
Are We Really Cloud-Native?
Are We Really Cloud-Native?Are We Really Cloud-Native?
Are We Really Cloud-Native?
 
CockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL DatabaseCockroachDB: Architecture of a Geo-Distributed SQL Database
CockroachDB: Architecture of a Geo-Distributed SQL Database
 
A Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with BrooklinA Dive into Streams @LinkedIn with Brooklin
A Dive into Streams @LinkedIn with Brooklin
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Dernier (20)

Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 

Disrupting the Banking Experience: Building a Mobile-Only Bank

  • 1. Disrupting the Banking Experience: Building a Mobile-only Bank Yann Del Rey Teresa Ng
  • 2. InfoQ.com: News & Community Site Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/ mobile-only-bank • Over 1,000,000 software developers, architects and CTOs read the site world- wide every month • 250,000 senior developers subscribe to our weekly newsletter • Published in 4 languages (English, Chinese, Japanese and Brazilian Portuguese) • Post content from our QCon conferences • 2 dedicated podcast channels: The InfoQ Podcast, with a focus on Architecture and The Engineering Culture Podcast, with a focus on building • 96 deep dives on innovative topics packed as downloadable emags and minibooks • Over 40 new content items per week
  • 3. Purpose of QCon - to empower software development by facilitating the spread of knowledge and innovation Strategy - practitioner-driven conference designed for YOU: influencers of change and innovation in your teams - speakers and topics driving the evolution and innovation - connecting and catalyzing the influencers and innovators Highlights - attended by more than 12,000 delegates since 2007 - held in 9 cities worldwide Presented at QCon London www.qconlondon.com
  • 4. Easy on-boarding Zero Fees Instant Notifications Public API - Open to all third party developers
  • 5. Starling Marketplace A marketplace for the best products, solving money problems Insurance FX Connectivity Where I spend Mortgages Other current accounts Loans Investment
  • 7. Founded by Anne Boden 2014 2014 November: Early technical prototyping 2015 January: Starling raises $70M, started building the bank 2016 July: PRA grants Starling its bank October: Testing Mastercard debit November: Alpha testing consumer app December: Processing direct debits January: Starling becomes the 13th member to join Faster Payments2017 February: Launched Beta testing program April: First ever Open Banking Hackathon May: Public App Store launch Summer: Apple & Google Pay, Spending Insights, Saving Goals
  • 9. How we work We have tried different variations: • Feature teams • Component teams
  • 10. Team structure example •The team: •All the mobile developers •Couple platform developers •Experts: •Product managers •Designers
  • 11. Our team structure iOS Android Back end Product managers Designers
  • 12. How do we decide who has to work on what? Flow: • Kanban board • Product managers prioritise new work • We as developers do our prioritisation • Whoever is free and wants to work on it
  • 13. How do we define the requirements? •Whoever picked the feature, will help defining the feature •Meetings are banned •Communication is key •starlingdevs.slack.com
  • 14. Allows us to innovate
  • 16. Our app architecture •Every design pattern has pros and cons •Picking one depends on the context •Iteration is key
  • 17. MVC •Pros: Good to quickly develop features, everyone knows it •Cons: Doesn’t work well for a big codebase - Massive view controllers - Not maintainable - Hard to test - Hard to reuse components
  • 18. MVC with closures Goal: Decrease view controllers size by decoupling the logic •Pros: reduces each component responsibilities •Cons: Still based on the MVC model - Doesn’t solve our problem on the long term - Closures are difficult to track
  • 20. VIPER Goal: Isolate each component into smaller pieces •Pros: SOLID principles, easy to test, good for a large team •Cons: - Lots of files - Boilerplate code - Protocols everywhere - Very difficult to iterate
  • 21. VIPER with RxSwift Goal: Reduce the number of files and boilerplate code •What is RxSwift •Remove protocols between interactor and presenter
  • 22. Stores Goal: Add reusability and decrease number of files •Replace interactors by stores •What is a Store •Extract and centralise the network and data layers
  • 23. View configuration Goal: Increase readability and decrease boilerplate code •What is a View configuration •Clear representation of a view •Remove Presenter - ViewController protocols •Easy to test and reuse
  • 28. What does it look like Router Presenter Stores ViewControllers View Configs + RxSwift Protocols Protocols + RxSwift
  • 29. What does it look like
  • 31. Oct 2016 
 First commit to the Android repo March 2016 Work begins on the iOS app May 2017 Public release of both apps
  • 32. What do we need to test… … with no QA team?
  • 33. What do we need to test? •What we don’t need to test: •Network calls are covered by our Platform tests •Utility Methods (date formatting, currency formatting etc) •Views, views, views •Interaction with these views
  • 34. Writing Tests •Java - Mockito, assertJ • Android - Espresso • RxJava2 & Dagger2
  • 35. Test All Views Are Visible @Test public void scrollAllSlides() { // perform activityRule.launchActivity(null); // Wait until the layout is created onView(withId(R.id.saving_intro_pager)).check(matches(isDisplayed())); SavingIntroActivity.Slide[] slides = SavingIntroActivity.Slide.values(); for (int i = 0; i < slides.length; i++) { onView(allOf(withId(R.id.saving_intro_slide_image), isCompletelyDisplayed())) .check(matches(withImageResource(slides[i].image))); onView(allOf(withId(R.id.saving_intro_slide_title), isCompletelyDisplayed())) .check(matches(withText(slides[i].title))); onView(allOf(withId(R.id.saving_intro_slide_description), isCompletelyDisplayed())) .check(matches(withText(slides[i].description))); onView(withId(R.id.saving_intro_pager)).perform(swipeLeft()); } }
  • 36. Testing Visibility of Views in Specific Scenarios @Test public void whenUnableToLoadMissingDataErrorIsDisplayed() throws Exception { doThrow(new IOException("")).when(starlingStorage).loadMissingData(); activityTestRule.launchActivity(null); verify(snackbarManager).show(any(), anyInt(), anyInt(), anyInt(), any()); verify(starlingStorage).loadMissingData(); // Retry button tries to reload data onView(withText(getTargetContext().getString(R.string.button_retry))) .perform(click()); verify(starlingStorage, times(2)).loadMissingData(); }
  • 37. Running the Tests •Unit tests can be run wherever •Different strategy is required for UI tests •UI tests need to cover: •Fragmentation •Usability
  • 39.
  • 40. ? …
  • 42.
  • 43. Test Reporting • Log the reason for failures • Record all the UI tests • Take screenshots of failures
  • 44. Example of Reporting in Action android.support.test.espresso.NoMatchingViewException: No views in hierarchy found matching: with string from resource id: <2131756434>[payments_add_payee] value: Add payee View Hierarchy: +>DecorView{id=-1, visibility=VISIBLE, width=600, height=1024, has- focus=false, has-focusable=true, has-window-focus=true, is- clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout- params=WM.LayoutParams{(0,0)(fillxfill) ty=1 fl=#85810100 pfl=0x20000 wanim=0x1030465 needsMenuKey=2}, tag=null, root-is-layout- requested=false, has-input-connection=false, x=0.0, y=0.0, child- count=3} | ……
  • 45. @Test public void testAddPayeeActivityLaunched() { // given when(payeeEntity.observeAll()).thenReturn(Flowable.empty()); Intents .intending(activityOf(PayeeLookupActivity.class)) .respondWith(new Instrumentation.ActivityResult(RESULT_OK, null)); // perform startActivity(); onView(withText(R.string.payments_add_payee)).perform(click()); // verify Intents.intended(activityOf(PayeeLookupActivity.class)); } Resolved by adding this to the test set-up: Failed here when(preferences.hasStarlingPayRequestIntroBeenShown()) .thenReturn(true);
  • 46. How we can take this further •Slackbot integration •Concurrency •Appium for application upgrade tests
  • 47. To conclude… •Stability of the app does not need to be sacrificed •This is just a start
  • 49. Watch the video with slide synchronization on InfoQ.com! https://www.infoq.com/presentations/mobile- only-bank