Faster testing with Kotlin Android case Justinas Krutulis

  • Slides: 48
Download presentation
Faster testing with Kotlin. Android case. Justinas Krutulis justinas. krutulis@gmail. com

Faster testing with Kotlin. Android case. Justinas Krutulis justinas. krutulis@gmail. com

Agenda We should write code for humans not to computers. Clean code. Expressive. Fewer

Agenda We should write code for humans not to computers. Clean code. Expressive. Fewer lines, that does same thing. Clean code Clean architecture Kotlin Koin

What would be interesting to know about Kotlin? Examples? Is it better? Could it

What would be interesting to know about Kotlin? Examples? Is it better? Could it be used in backend? Thor. https: //kotlin. link/. Kotlin spring IDEA support?

What would be interesting to know about MVVM? Examples? What to choose?

What would be interesting to know about MVVM? Examples? What to choose?

Kiss

Kiss

Kiss Agenda Commercial for Kotlin, Koin, MVVM testing, couse it works and it’s cool

Kiss Agenda Commercial for Kotlin, Koin, MVVM testing, couse it works and it’s cool Commercial for movie “Pentagon wars” if we will have time

Clean code + Helps to clear the thoughts, intent, tests - Takes time, refactoring,

Clean code + Helps to clear the thoughts, intent, tests - Takes time, refactoring, effort to separate dependencies, extra work. Ref: https: //www. planetgeek. ch/wpcontent/uploads/2014/11/Clean-Code-V 2. 4. pdf

MVVM 1 UI components are separated from business logic 2 Business logic is separated

MVVM 1 UI components are separated from business logic 2 Business logic is separated from Database 3 Easy to understand read 4 A lot of less to worry about lifecycle

Clean architecture MVVM Ref: https: //github. com/android 10/And roid-Clean. Architecture-Kotlin

Clean architecture MVVM Ref: https: //github. com/android 10/And roid-Clean. Architecture-Kotlin

Clean architecture MVP Ref: https: //github. com/android 10/Android. Clean. Architecture

Clean architecture MVP Ref: https: //github. com/android 10/Android. Clean. Architecture

MVVM vs MVP.

MVVM vs MVP.

MVVM vs MVP vs MVC https: //www. simform. com/m vc-mvp-mvvm-android-appdevelopment/

MVVM vs MVP vs MVC https: //www. simform. com/m vc-mvp-mvvm-android-appdevelopment/

MVVM

MVVM

MVVM

MVVM

Contradiction

Contradiction

Contradiction

Contradiction

MVVM vs MVP vs MVC

MVVM vs MVP vs MVC

MVVM vs MVP vs MVC KISS

MVVM vs MVP vs MVC KISS

Why MVVM? Official by android with androidx (jetpack) Easy to seperate and test Less

Why MVVM? Official by android with androidx (jetpack) Easy to seperate and test Less interfaces, less code

MVVM vs MVP. from codebase

MVVM vs MVP. from codebase

Databinding

Databinding

MVVM officially supported by androidx and Databinding

MVVM officially supported by androidx and Databinding

Kotlin official from 2017

Kotlin official from 2017

2019 ? https: //medium. freecodecamp. org/https-medium-com-rahman -sameeha-whats-flutter-an-intro -to-dart-6 fc 42 ba 7 c 4

2019 ? https: //medium. freecodecamp. org/https-medium-com-rahman -sameeha-whats-flutter-an-intro -to-dart-6 fc 42 ba 7 c 4 a 3

https: //insert-koin. io/

https: //insert-koin. io/

https: //www. slideshare. net/ssuser 80 beb 5/koi n-for-dependency-injection

https: //www. slideshare. net/ssuser 80 beb 5/koi n-for-dependency-injection

Koin vs Dagger

Koin vs Dagger

How to write test Faster and Easier?

How to write test Faster and Easier?

Less code, less code to read, misinterpreted and less to unit test KISS Clean

Less code, less code to read, misinterpreted and less to unit test KISS Clean code Clean architecture MVVM Activity Databinding + Live. Data Kotlin + Single

Testing

Testing

https: //proandroiddev. com/writing-integrationtests-in-android-b 0436978 ed 7 b Writing less “Instrumental tests”

https: //proandroiddev. com/writing-integrationtests-in-android-b 0436978 ed 7 b Writing less “Instrumental tests”

Writing even less “Instrumental tests”

Writing even less “Instrumental tests”

Actual implementation

Actual implementation

Single activity. Many fragments

Single activity. Many fragments

Demo https: //play. google. com/store/apps/details? id =net. justinas. minitemplate https: //gitlab. com/dzastinas/mini-list

Demo https: //play. google. com/store/apps/details? id =net. justinas. minitemplate https: //gitlab. com/dzastinas/mini-list

Why even the best architecture in the world will not help (Full movie in

Why even the best architecture in the world will not help (Full movie in Youtube)

Communication

Communication