Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Menjadi Android Developer Expert - BDT DAY 2020 -

1fe3e1b3343b555b0a195180607fbd6a?s=47 Ahmad Arif Faizin
November 29, 2020
60

Menjadi Android Developer Expert - BDT DAY 2020 -

How to not only make apps, but how to make good apps with architecture that easy to understand, easy to maintain, and easy to change.
https://youtu.be/60tbLQzS8g4?t=6776

1fe3e1b3343b555b0a195180607fbd6a?s=128

Ahmad Arif Faizin

November 29, 2020
Tweet

Transcript

  1. Menjadi Android Developer Expert Ahmad Arif Faizin Curriculum Developer -

    Dicoding Indonesia
  2. “Even bad code can function. But if code isn’t clean,

    it can bring a development organization to its knees.” -Uncle Bob
  3. Software Design Principle • Understandable (mudah dipahami) • Maintainable (mudah

    dikelola) • Flexible (mudah diubah)
  4. • Independent of Framework • Testable • Independent of UI

    • Independent of Database • Independent of External Clean Architecture
  5. Clean Architecture Layer

  6. None
  7. Dependency Inversion Principle

  8. Reactive Programming Asynchronous Data Stream

  9. 3 “o” • observable • observer • operator

  10. Chaining Operator

  11. Rx Operator

  12. Reactive UI

  13. Callback vs Rx

  14. Reactive Library

  15. None
  16. Dependency Injection (DI)

  17. • Without DI class Car { private val engine =

    Engine() fun start() { engine.start() } } fun main() { val car = Car() car.start() } • With DI class Car(private val engine: Engine){ fun start() { engine.start() } } fun main() { val engine = Engine() val car = Car(engine) car.start() } DI Manual Manual DI
  18. DI Library

  19. Automated Injection with Koin • Before class MainActivity : AppCompatActivity()

    { lateinit var engine: Engine override fun onCreate(...) { ... engine = Engine() val car = Car(engine) car.start() } } • After class MainActivity : AppCompatActivity() { val engine: Engine by inject() override fun onCreate(...) { ... val car = Car(engine) car.start() } }
  20. Automated Injection with Dagger • Before class MainActivity : AppCompatActivity()

    { lateinit var engine: Engine override fun onCreate(...) { ... engine = Engine() val car = Car(engine) car.start() } } • After class MainActivity : AppCompatActivity() { @Inject lateinit var engine: Engine override fun onCreate(...) { appComponent.inject(this) ... val car = Car(engine) car.start() } }
  21. Automated Injection with Dagger Hilt • Before class MainActivity :

    AppCompatActivity() { lateinit var engine: Engine override fun onCreate(...) { ... engine = Engine() val car = Car(engine) car.start() } } • After @AndroidEntryPoint class MainActivity : AppCompatActivity() { @Inject lateinit var engine: Engine override fun onCreate(...) { ... val car = Car(engine) car.start() } }
  22. None
  23. Modularization

  24. Why Modularization? • Separation of concern • Proses build jadi

    lebih cepat • Code ownership • Reusability • Lebih aman ketika crash • Batasan yang lebih jelas daripada package • Bisa membuat Instant App dan Dynamic Feature Replace Me! (Bisa ditambahkan dengan image yang relevan)
  25. Dynamic Delivery with AAB (Android App Bundle)

  26. Dynamic Feature

  27. Summary • Ingat Software Design Principle • Pelajari Clean Architecture

    supaya kode lebih mudah dikembangkan • Pelajari Reactive Programming supaya kode lebih mudah dipahami • Pelajari Dependency Injection supaya kode lebih mudah digunakan kembali • Pelajari Modularization supaya kode lebih mudah dikelola
  28. None
  29. None
  30. Contact: Instagram: @arif_faizin Medium: @arifaizin Email: arif@dicoding.com