4. Running order
• What is fragmentation & clean code?
• Make the most of the Android platform
• DIY: Compatible cross-version features
• Handle complexity with MVP
• Write tests that cover all devices
• Q & A
5. Running order
• What is fragmentation & clean code?
• Make the most of the Android platform
• DIY: Compatible cross-version features
• Handle complexity with MVP
• Write tests that cover all devices
• Q & A
19. Running order
• What is fragmentation & clean code?
• Make the most of the Android platform
• DIY: Compatible cross-version features
• Handle complexity with MVP
• Write tests that cover all devices
• Q & A
27. What we have gained
• Less code
• Separated presentation to logic
• Flexible UI
28. Running order
• What is fragmentation & clean code?
• Make the most of the Android platform
• DIY: Compatible cross-version features
• Handle complexity with MVP
• Write tests that cover all devices
• Q & A
30. Compatibility libraries
• Backport features to old OS versions
• Version checking and graceful degradation
• Same package structure, different namespace
– android.app
– android.support.v2.app
• “Deprecated by design”
32. Dependency Inject, Yourself (DIY)
• Break hardcoded dependencies
• What vs how
• Behaviour vs implementation
• Swappable dependencies for test and
production runtimes
37. What we have gained
• Eliminated ‘ifs’ from production code
• Maintainability
• Testable code
• Reusable code
• More users
38. Running order
• What is fragmentation & clean code?
• Make the most of the Android platform
• DIY: Compatible cross-version features
• Handle complexity with MVP
• Write tests that cover all devices
• Q & A
41. Issues with presentation complexity
• Compounds complexity of lifecycle
• Testing presentation logic difficult
• Unfulfilled dependencies when in JVM
java.lang.RuntimeException: Stub!
• Robolectric is the only option
46. What we have gained
• Separation of concerns
• Testable presentation logic
• Reusable code
• Avoiding need for dependencies when running
Android tests on JVM
47. Running order
• What is fragmentation & clean code?
• Make the most of the Android platform
• DIY: Compatible cross-version features
• Handle complexity with MVP
• Write tests that cover all devices
• Q & A
63. Summary
• Relationship of fragmentation & clean code
• How to make the most of Android
• How to write compatible code cleanly
• How to apply the MVP pattern
• How to write awesome automation tests