SlideShare a Scribd company logo
1 of 52
Office Delve – for Office 365
Konstantin Loginov
About me
• 7 years in Mobile development:
 Windows Mobile
 webOS
 Windows Phone 7/8
 iOS (native/Xamarin)
 Android
Current Position: Software Engineer in Microsoft
LinkedIn / email
Office Delve
• “Flipboard for Office365” ©
• Code name: Oslo
• Tangled creation story
Steps towards Delve Mobile
Steps towards Delve Mobile
• Started as a team of two
• Android first
• Pivoted multiple times
& created various MVPs
• Application as an engagement driver for
the whole service
Development
Working process
• Non-formal Scrum, 2-weeks-long sprint
• Bi-weekly releases
• Team Foundation Server 2013 for task tracking
• Slack for team collaboration (love it!)
• GIT as revision control system
• Android studio (latest Canary build) as an IDE
• Internal tool for bug-tracking and code reviews
• OneNote as a knowledge base
• Today: 4 Android devs & 3.5 iOS devs
We love opensource
• Dagger (dependency injection)
• ButterKnife (view injection)
• EventBus
• Retrofit
• OkHttp
• Picasso
• Esty StaggeredGridView
• Compatibility libs
Upcoming: Mortar & Flow.
(As others, we Square )
• Mockito (Testing)
• AssertJ (Testing)
Design patterns we use
• Dependency injection
• Publish–subscribe pattern
• Data Access Object
Dependency Injection
Dependency Injection - Dagger
class DataProvider {
DataSource dataSource =
new DelveApi();
}
class DataProvider {
@Inject
DataSource dataSource;
}
11
class DataProvider {
private DataSource dataSource;
@Inject
DataProvider(DataSource dataSource) {
this.dataSource = dataSource;
}
}
Dependency Injection - Dagger
• Standard javax.inject annotations (JSR-30)
• Need to declare “modules” for compile-time validation and code
generation
• Specifies “provider” methods
• @Singleton annotation
• Lists supported classes (which in turn generates code)
• Supports override
• Inject mocks in tests
• Substituting back-ends is a one-line change
Dependency Injection - Dagger 2
• Just released
• No reflection, no ObjectGraph/Injector, @Component interface
• We’re planning to switch to it soon
Publish–subscribe pattern - EventBus
• We use greenrobot/EventBus
• Performs well with Activities, Fragments, and background threads
• Decouples event senders and receivers
• Avoids complex and error-prone dependencies and life cycle issues
Activity
(hosts fragments)
Data Access Layer
(Subscriber)
Fragment A
Fragment B
Data
Subscriber
Error Subscriber
ERROR
Navigation Event
Subscriber
Data
Subscriber
Open Fragment A
Data Access Object
• DAO is an object that provides an abstract interface to the database.
By mapping application calls to the persistence layer, DAO provides
specific data operations without exposing details of the database.
User
User getById(String userId)
List<User> queryMatch(String q, int l, int o)
SqlLocalStorageUserDao
User getById(String userId) {
/* Getting data from SQLite */
}
List<User> queryMatch(String q,int l,int o) {
/* Getting data from SQLite */
}
UserDaoImpl
DataProvider Layer
….
localStorage.getUser(userId);
….
UserDao userDao;
User getUser(String userId) {
return userDao.getUserById(userId);
}
String userId;
Pinterest-style navigation model
• V1
Pros:
• Gestures between tabs
• Easy to implement
Cons:
• 3 «heavy» pages in ViewPager
• No Tab-switching-buttons in Profile/Document pages
Pinterest-style navigation model
• V2
Pros:
• Still easy to implement
• Pretty effective
• Tab-buttons everywhere
Cons:
• No gestures
• Not keeping state of not-selected tab-fragments
Pinterest-style navigation model
• V3 (current)
Pros:
• Should be familiar for instagram users
Cons:
• Ugly in implementation
• Breaking OS design-guidelines
Pinterest-style navigation model – Going forward
• V4 (future)
Yeah! We like changes in Navigation model 
• Side nav as the way of switching between pivots
• Material design
Testing
Testing
• Manual testing
• Alpha & Beta programs
• Unit tests (Test Coverage 75+%)
 Mockito
 AssertJ
• Monkey testing
( adb shell monkey -p com.microsoft.delvemobile -v 10000 )
• Memory profiling
Mockito
• Mocks made easy
• Don’t “expect” before the fact; query object afterwards
• Simple to use
• Stages of a test
• Setup (as necessary)
• Test
• Verification
38
Mockito: Verify Interactions
// mock creation
List mockedList = mock(List.class);
// using mock object; observe that it didn't throw any
// "unexpected interaction exception" exception
mockedList.add("one");
mockedList.clear();
// selective & explicit verification
verify(mockedList).add("one");
verify(mockedList).clear();
39
Mockito: Verify Interactions 2
verify(mockedList, times(2)).add("one");
verify(mockedList, atLeastOnce()).add("one");
verify(mockedList, never()).clear();
40
Mockito: Stub Method Calls
// you can mock concrete classes, not only interfaces
LinkedList mockedList = mock(LinkedList.class);
// stubbing; before the actual execution
when(mockedList.get(0)).thenReturn("first");
// the following prints "first"
System.out.println(mockedList.get(0));
// the following prints "null" because get(999) was not stubbed
System.out.println(mockedList.get(999));
41
Mockito: Advanced Features
• Spy: Partial stubbing of real object through proxy
• Mocking by annotation
• Argument matching
42
AssertJ: Readable Asserts
Regular JUnit
assertEquals(
View.GONE,
view.getVisibility());
AssertJ Android
assertThat(view).isGone();
43
public static final int GONE = 0x00000008;
AssertJ: Readable Assert Chaining
Regular JUnit
assertEquals(View.VISIBLE,
layout.getVisibility());
assertEquals(VERTICAL,
layout.getOrientation());
assertEquals(4,
layout.getChildCount());
assertEquals(SHOW_DIVIDERS_MIDDLE,
layout.getShowDividers());
AssertJ Android
assertThat(layout)
.isVisible()
.isVertical()
.hasChildCount(4)
.hasShowDividers(
SHOW_DIVIDERS_MIDDLE);
44
Analytics & Crashalitics
We use (on both platforms):
• Crittercism (http://www.crittercism.com/)
• MixPanel (https://mixpanel.com/)
• AppFigures (https://appfigures.com/)
Data reviewed daily
Crittercism
• Automated Crash logging
• Automated network request logging
• Breadcrumbs
• Handled exceptions logging
• Alarms & lifetime dashboard
• latency
• error rate
• request volume
Crittercism: cases
• Delve Mobile crashed 44 times (14-26 April)
• Our crash rate:
• Average crash rate:
Crittercism: our crashes
• Most popular crash (50+% of total number):• Breadcrumbs we got:
MixPanel
• Funnels
• User-events
• Measure user’s retention & engagement
Feedback we got
Feedback we got through feedback-form:
• Disabling notifications feature-request
• Empty documents feed issues
Things we learn
• Cross-platform design does not work
• Square rocks
• Majority of our users are using Android 5.0+
• Learn about your users before start: majority of our users are using
iOS  (~1:3)
• Fragments are bad
• Crittercism is amazing
Mobile Developers Talks: Delve Mobile

More Related Content

What's hot

Introduction.to.j query
Introduction.to.j queryIntroduction.to.j query
Introduction.to.j query
Hunter Wu
 

What's hot (20)

2nd-Order-SQLi-Josh
2nd-Order-SQLi-Josh2nd-Order-SQLi-Josh
2nd-Order-SQLi-Josh
 
Creating Single Page Web App using Backbone JS
Creating Single Page Web App using Backbone JSCreating Single Page Web App using Backbone JS
Creating Single Page Web App using Backbone JS
 
The Snake and the Butler
The Snake and the ButlerThe Snake and the Butler
The Snake and the Butler
 
Modern Web Developement
Modern Web DevelopementModern Web Developement
Modern Web Developement
 
Javascript talk
Javascript talkJavascript talk
Javascript talk
 
UI testing in Xcode 7
UI testing in Xcode 7UI testing in Xcode 7
UI testing in Xcode 7
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
 
Developing iOS REST Applications
Developing iOS REST ApplicationsDeveloping iOS REST Applications
Developing iOS REST Applications
 
A To-do Web App on Google App Engine
A To-do Web App on Google App EngineA To-do Web App on Google App Engine
A To-do Web App on Google App Engine
 
JavaScript - Chapter 11 - Events
 JavaScript - Chapter 11 - Events  JavaScript - Chapter 11 - Events
JavaScript - Chapter 11 - Events
 
J Query Presentation of David
J Query Presentation of DavidJ Query Presentation of David
J Query Presentation of David
 
iOS Development Methodology
iOS Development MethodologyiOS Development Methodology
iOS Development Methodology
 
Async best practices DotNet Conference 2016
Async best practices DotNet Conference 2016 Async best practices DotNet Conference 2016
Async best practices DotNet Conference 2016
 
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
[NDC 2019] Functions 2.0: Enterprise-Grade Serverless
 
Creating a WYSIWYG Editor with React
Creating a WYSIWYG Editor with ReactCreating a WYSIWYG Editor with React
Creating a WYSIWYG Editor with React
 
Using FakeIteasy
Using FakeIteasyUsing FakeIteasy
Using FakeIteasy
 
Opensocial
OpensocialOpensocial
Opensocial
 
Object Oriented Programing in JavaScript
Object Oriented Programing in JavaScriptObject Oriented Programing in JavaScript
Object Oriented Programing in JavaScript
 
Introduction.to.j query
Introduction.to.j queryIntroduction.to.j query
Introduction.to.j query
 
Breaking Dependencies to Allow Unit Testing
Breaking Dependencies to Allow Unit TestingBreaking Dependencies to Allow Unit Testing
Breaking Dependencies to Allow Unit Testing
 

Similar to Mobile Developers Talks: Delve Mobile

Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator Presentation
Aaron Saunders
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 

Similar to Mobile Developers Talks: Delve Mobile (20)

From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)From Legacy to Hexagonal (An Unexpected Android Journey)
From Legacy to Hexagonal (An Unexpected Android Journey)
 
Modeveast Appcelerator Presentation
Modeveast Appcelerator PresentationModeveast Appcelerator Presentation
Modeveast Appcelerator Presentation
 
How to Contribute to Apache Usergrid
How to Contribute to Apache UsergridHow to Contribute to Apache Usergrid
How to Contribute to Apache Usergrid
 
Building Top-Notch Androids SDKs
Building Top-Notch Androids SDKsBuilding Top-Notch Androids SDKs
Building Top-Notch Androids SDKs
 
iPhone Development Intro
iPhone Development IntroiPhone Development Intro
iPhone Development Intro
 
Real World Asp.Net WebApi Applications
Real World Asp.Net WebApi ApplicationsReal World Asp.Net WebApi Applications
Real World Asp.Net WebApi Applications
 
5 x HTML5 worth using in APEX (5)
5 x HTML5 worth using in APEX (5)5 x HTML5 worth using in APEX (5)
5 x HTML5 worth using in APEX (5)
 
iPhone development from a Java perspective (Jazoon '09)
iPhone development from a Java perspective (Jazoon '09)iPhone development from a Java perspective (Jazoon '09)
iPhone development from a Java perspective (Jazoon '09)
 
Testing Ext JS and Sencha Touch
Testing Ext JS and Sencha TouchTesting Ext JS and Sencha Touch
Testing Ext JS and Sencha Touch
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD CombinationLotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
 
Jquery fundamentals
Jquery fundamentalsJquery fundamentals
Jquery fundamentals
 
Adding a modern twist to legacy web applications
Adding a modern twist to legacy web applicationsAdding a modern twist to legacy web applications
Adding a modern twist to legacy web applications
 
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & MobileIVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
IVS CTO Night And Day 2018 Winter - [re:Cap] Serverless & Mobile
 
React state management with Redux and MobX
React state management with Redux and MobXReact state management with Redux and MobX
React state management with Redux and MobX
 
CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!
 
WOdka
WOdkaWOdka
WOdka
 
Javascript first-class citizenery
Javascript first-class citizeneryJavascript first-class citizenery
Javascript first-class citizenery
 
Plone FSR
Plone FSRPlone FSR
Plone FSR
 
Introduction to interactive data visualisation using R Shiny
Introduction to interactive data visualisation using R ShinyIntroduction to interactive data visualisation using R Shiny
Introduction to interactive data visualisation using R Shiny
 

Recently uploaded

Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
dharasingh5698
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
 

Recently uploaded (20)

Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE  and Energy Efficient BUILDINGS ptxCOST-EFFETIVE  and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 

Mobile Developers Talks: Delve Mobile

  • 1. Office Delve – for Office 365 Konstantin Loginov
  • 2. About me • 7 years in Mobile development:  Windows Mobile  webOS  Windows Phone 7/8  iOS (native/Xamarin)  Android Current Position: Software Engineer in Microsoft LinkedIn / email
  • 3. Office Delve • “Flipboard for Office365” © • Code name: Oslo • Tangled creation story
  • 5. Steps towards Delve Mobile • Started as a team of two • Android first • Pivoted multiple times & created various MVPs • Application as an engagement driver for the whole service
  • 7. Working process • Non-formal Scrum, 2-weeks-long sprint • Bi-weekly releases • Team Foundation Server 2013 for task tracking • Slack for team collaboration (love it!) • GIT as revision control system • Android studio (latest Canary build) as an IDE • Internal tool for bug-tracking and code reviews • OneNote as a knowledge base • Today: 4 Android devs & 3.5 iOS devs
  • 8. We love opensource • Dagger (dependency injection) • ButterKnife (view injection) • EventBus • Retrofit • OkHttp • Picasso • Esty StaggeredGridView • Compatibility libs Upcoming: Mortar & Flow. (As others, we Square ) • Mockito (Testing) • AssertJ (Testing)
  • 9. Design patterns we use • Dependency injection • Publish–subscribe pattern • Data Access Object
  • 11. Dependency Injection - Dagger class DataProvider { DataSource dataSource = new DelveApi(); } class DataProvider { @Inject DataSource dataSource; } 11 class DataProvider { private DataSource dataSource; @Inject DataProvider(DataSource dataSource) { this.dataSource = dataSource; } }
  • 12. Dependency Injection - Dagger • Standard javax.inject annotations (JSR-30) • Need to declare “modules” for compile-time validation and code generation • Specifies “provider” methods • @Singleton annotation • Lists supported classes (which in turn generates code) • Supports override • Inject mocks in tests • Substituting back-ends is a one-line change
  • 13. Dependency Injection - Dagger 2 • Just released • No reflection, no ObjectGraph/Injector, @Component interface • We’re planning to switch to it soon
  • 14. Publish–subscribe pattern - EventBus • We use greenrobot/EventBus • Performs well with Activities, Fragments, and background threads • Decouples event senders and receivers • Avoids complex and error-prone dependencies and life cycle issues
  • 15. Activity (hosts fragments) Data Access Layer (Subscriber) Fragment A Fragment B Data Subscriber Error Subscriber ERROR Navigation Event Subscriber Data Subscriber Open Fragment A
  • 16. Data Access Object • DAO is an object that provides an abstract interface to the database. By mapping application calls to the persistence layer, DAO provides specific data operations without exposing details of the database. User User getById(String userId) List<User> queryMatch(String q, int l, int o) SqlLocalStorageUserDao User getById(String userId) { /* Getting data from SQLite */ } List<User> queryMatch(String q,int l,int o) { /* Getting data from SQLite */ } UserDaoImpl DataProvider Layer …. localStorage.getUser(userId); …. UserDao userDao; User getUser(String userId) { return userDao.getUserById(userId); } String userId;
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25. Pinterest-style navigation model • V1 Pros: • Gestures between tabs • Easy to implement Cons: • 3 «heavy» pages in ViewPager • No Tab-switching-buttons in Profile/Document pages
  • 26.
  • 27.
  • 28.
  • 29. Pinterest-style navigation model • V2 Pros: • Still easy to implement • Pretty effective • Tab-buttons everywhere Cons: • No gestures • Not keeping state of not-selected tab-fragments
  • 30.
  • 31.
  • 32.
  • 33.
  • 34. Pinterest-style navigation model • V3 (current) Pros: • Should be familiar for instagram users Cons: • Ugly in implementation • Breaking OS design-guidelines
  • 35. Pinterest-style navigation model – Going forward • V4 (future) Yeah! We like changes in Navigation model  • Side nav as the way of switching between pivots • Material design
  • 37. Testing • Manual testing • Alpha & Beta programs • Unit tests (Test Coverage 75+%)  Mockito  AssertJ • Monkey testing ( adb shell monkey -p com.microsoft.delvemobile -v 10000 ) • Memory profiling
  • 38. Mockito • Mocks made easy • Don’t “expect” before the fact; query object afterwards • Simple to use • Stages of a test • Setup (as necessary) • Test • Verification 38
  • 39. Mockito: Verify Interactions // mock creation List mockedList = mock(List.class); // using mock object; observe that it didn't throw any // "unexpected interaction exception" exception mockedList.add("one"); mockedList.clear(); // selective & explicit verification verify(mockedList).add("one"); verify(mockedList).clear(); 39
  • 40. Mockito: Verify Interactions 2 verify(mockedList, times(2)).add("one"); verify(mockedList, atLeastOnce()).add("one"); verify(mockedList, never()).clear(); 40
  • 41. Mockito: Stub Method Calls // you can mock concrete classes, not only interfaces LinkedList mockedList = mock(LinkedList.class); // stubbing; before the actual execution when(mockedList.get(0)).thenReturn("first"); // the following prints "first" System.out.println(mockedList.get(0)); // the following prints "null" because get(999) was not stubbed System.out.println(mockedList.get(999)); 41
  • 42. Mockito: Advanced Features • Spy: Partial stubbing of real object through proxy • Mocking by annotation • Argument matching 42
  • 43. AssertJ: Readable Asserts Regular JUnit assertEquals( View.GONE, view.getVisibility()); AssertJ Android assertThat(view).isGone(); 43 public static final int GONE = 0x00000008;
  • 44. AssertJ: Readable Assert Chaining Regular JUnit assertEquals(View.VISIBLE, layout.getVisibility()); assertEquals(VERTICAL, layout.getOrientation()); assertEquals(4, layout.getChildCount()); assertEquals(SHOW_DIVIDERS_MIDDLE, layout.getShowDividers()); AssertJ Android assertThat(layout) .isVisible() .isVertical() .hasChildCount(4) .hasShowDividers( SHOW_DIVIDERS_MIDDLE); 44
  • 45. Analytics & Crashalitics We use (on both platforms): • Crittercism (http://www.crittercism.com/) • MixPanel (https://mixpanel.com/) • AppFigures (https://appfigures.com/) Data reviewed daily
  • 46. Crittercism • Automated Crash logging • Automated network request logging • Breadcrumbs • Handled exceptions logging • Alarms & lifetime dashboard • latency • error rate • request volume
  • 47. Crittercism: cases • Delve Mobile crashed 44 times (14-26 April) • Our crash rate: • Average crash rate:
  • 48. Crittercism: our crashes • Most popular crash (50+% of total number):• Breadcrumbs we got:
  • 49. MixPanel • Funnels • User-events • Measure user’s retention & engagement
  • 50. Feedback we got Feedback we got through feedback-form: • Disabling notifications feature-request • Empty documents feed issues
  • 51. Things we learn • Cross-platform design does not work • Square rocks • Majority of our users are using Android 5.0+ • Learn about your users before start: majority of our users are using iOS  (~1:3) • Fragments are bad • Crittercism is amazing