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

Modern Android Development

Modern Android Development

Modern Android Development class at Geeky Base (04/03/2018)

WeRockStar

March 04, 2018
Tweet

More Decks by WeRockStar

Other Decks in Programming

Transcript

  1. M O D E R N A N D R

    O I D D E V E L O P M E N T W E R O C K S TA R
  2. Modern? Blockchain 3D Printing IoT AI Disrupt Innovation Thailand 4.0

    Digital Transformation Anonymous Car (Driverless card)
  3. Modern? - Kotlin language - Constraint Layout - Performance Matter

    (UI) - RxJava2 - Dependency Injection with Dagger2 - Unit Test with JUnit and Mockito - UI Test with Espresso - Automate Deploy with Fastlane - Monitoring
  4. KOTLIN (1.2) achievement - Official language for android - More

    than 17% project in android studio 3.0 - Support Spring 5.0 - Gradle Kotlin DSL - Support JVM, JS, Native**
  5. Design layout by traditional way (layout) Linear Layout Relative Layout

    Frame Layout Percent Relative Layout - Deprecated in 26.1.0
  6. User Interface - Performance Main topic for better rendering performance

    - Frame rate, Our goal is to maintain 60 FPS - Overdraw - View Hierarchy Screen is refresh every 16 ms (1 s/60 fps = 16 ms per frame)
  7. 3 phases drawing process of View Measure (onMeasure) - How

    big (Size) Layout (onLayout) - How position (Position) Draw (onDraw) - How draw
  8. Overdraw White - No overdraw Blue - 1x overdraw Green

    - 2x overdraw Light red - 3x overdraw Dark red - 4x or more overdraw
  9. Memory - Performance Main topic for better memory performance -

    Garbage collection - Runtime (Dalvik, ART) - Memory Leak - References (Normal, Soft, Weak, Plantom)
  10. More and More and More - Networking - Multithread -

    CPU/GPU - Battery Consumption - ?? - ??
  11. Reactive Programming Reactive programming is a general programming term that

    is focused on reacting to changes, such as data values or events - Ben Christensen
  12. Reactive Programming It hard to definition of Reactive Programming Characteristics

    of Reactive programming - Propagate for change - Data streams (Everything is Stream) - React to change
  13. RxJava RxJava is a library for composing asynchronous and event-based

    programs using observable sequences for the Java VM.
  14. Testing on Android R U N O N J V

    M ( l o c a l u n i t t e s t s ) R E Q U I R E A N D R O I D ( i n s t r u m e n t a t i o n t e s t s ) module-name/src/test/java/. module-name/src/androidTest/java/
  15. Good Unit Testing - No external dependency. - Fast -

    Repeatable - Indenpendent - Test only one concern - Etc.
  16. Refactoring to Simple Pattern V I E W M O

    D E L P R E S E N T E R A N D R O I D P U R E K O T L I N A N D R O I D
  17. Automate Deploy with Fastlane Fastlane is easiest way to automate

    beta deployments and releases for your iOS and Android apps https://docs.fastlane.tools/getting-started/android/release- deployment/
  18. Future Read TDD - Test Driven Development Clean Code Continuous

    Integration Continuous Delivery Refactoring Android Architecture Component WeRockStar