Slide 1

Slide 1 text

Architecting android app for Scale Ashwini Kumar Director of Engineering - PayU Credit GDE - Firebase @reactivedroid Build for India, Build for the world

Slide 2

Slide 2 text

Goals ● Develop in Kotlin. Use latest language constructs ● Consistent design and app architecture ● Separation of Concern ● Enhance developer productivity ● Better test coverage ● Modernization of tech stack ● Robust and scalable ● Modularization of code base ● Faster app performance

Slide 3

Slide 3 text

The difference between good and bad architecture is the time you spent on it. - David Chipperfield

Slide 4

Slide 4 text

App Design Clean Code Architecture ● Outer circle -> Mechanisms & Inner Circle -> Contracts ● Dependencies always point inwards ● Separation of concern ● Loose Coupling ● Highly testable

Slide 5

Slide 5 text

App Design MVVM Design ● Model-View-ViewModel ● Inversion of Control - DI ● Unidirectional flow ● Reactive with Kotlin Coroutines ● Developer productivity ● Easily modularised ● Highly testable

Slide 6

Slide 6 text

Don’t try to reinvent the wheel, just work on making it better than anyone else. - John Muir

Slide 7

Slide 7 text

Modernisation ● Kotlin with Coroutines ● Handle Lifecycle with Lifecycle aware components like ViewModel ● UI Using View- ViewBinding for interaction with UI and Data Binding to bind data into your UI. ● Move across screens using Jetpack Navigation ● Build with Jetpack Compose ● Dependency Injection with HILT ● Improve performance with Jetpack Benchmark and App Startup ● Persistence with DataStore and Room ● Image loading using Coil ● Automation using Fastlane and Firebase App Distribution or any other CI/CD pipeline ● Networking with Retrofit over OkHttp and Moshi

Slide 8

Slide 8 text

We cannot learn something new and stick to it without a modular approach to application, positive reinforcement and a real change to environment. - David Amerland

Slide 9

Slide 9 text

Modularisation ● Multi-modular architecture ● Improve build time ● Separation of concern. ● PODs or Containers for small modules. Focussed development. ● High performance. ● Faster feature delivery. ● Use for experimentation around technologies. ● Kotin Multi-Mobile Platform(KMP) ○ SQLDelight ○ Okhttp and more

Slide 10

Slide 10 text

Modularisation Tivi by Chris Banes

Slide 11

Slide 11 text

A good programmer is someone who always looks both ways before crossing a one-way street. - Doug Linder

Slide 12

Slide 12 text

References ● https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architectur e.html ● https://developer.android.com/jetpack/guide ● https://developer.android.com/training/dependency-injection/hilt-android ● https://github.com/reactivedroid/TvFlix ● https://github.com/chrisbanes/tivi ● https://github.com/skydoves/Pokedex ● https://github.com/ZacSweers/CatchUp ● https://developer.android.com/jetpack/compose/ ● https://github.com/android/compose-samples ● https://touchlab.co/kotlin-multiplatform-guide/

Slide 13

Slide 13 text

Thank You :)