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

The Immense Benefits Of Not Thinking In Screens

The Immense Benefits Of Not Thinking In Screens

Video: https://badootech.badoo.com/the-immense-benefits-of-not-thinking-in-screens-6c311e3344a0

Abstract:

Maintaining a large project and not going insane — in practice:

– Causes of everyday development pain, frustration and slowdown less frequently talked about

– Breaking down the complexity of screens instead of a classical layering approach

– Keeping code easy-to-understand, decoupled and maintainable even in highly complex projects

– A plug-and-play component architecture where individual pieces don’t require a deep understanding or careful wiring and can be reused in a few minutes

We now have over half a billion users across a growing portfolio of apps, including Badoo, Bumble, Chappy and Lumen.

A year ago we set out on a journey to unify and scale up our approaches to reduce component reuse and maintenance times by an order of magnitude. We reached for maximal reusability and minimal coupling between individual components.
Many of the lessons we learned in the process have immense practical benefits for projects of all sizes.

Zsolt Kocsi

October 24, 2019
Tweet

More Decks by Zsolt Kocsi

Other Decks in Programming

Transcript

  1. The 5 stages of grief software engineering 1. Denial 2.

    Anger 3. Bargaining 4. Depression 5. Acceptance 12
  2. The 5 stages of grief software engineering 1. Denial 2.

    Anger 3. Bargaining 4. Depression 5. Acceptance 13
  3. 18

  4. 21

  5. 22

  6. 25

  7. 26

  8. 27

  9. 28

  10. 33

  11. 35

  12. 37

  13. 38

  14. 42

  15. 43

  16. 44

  17. WHOLE SCREEN IS A MODULE 1. can easily get out

    of hand 2. reuse sub-screen? 48
  18. interface ExampleComponent { interface Dependency { fun userDataSource(): UserDataSource fun

    inputSource(): ObservableSource<Input> fun outputConsumer(): Consumer<Output> } sealed class Input { object DoSomething : Input() } sealed class Output { data class SomethingHappened(val entity: MainEntity) : Output() } data class MainEntity( val text: String ) } 59
  19. interface ExampleComponent { interface Dependency { fun userDataSource(): UserDataSource fun

    inputSource(): ObservableSource<Input> fun outputConsumer(): Consumer<Output> } sealed class Input { object DoSomething : Input() } sealed class Output { data class SomethingHappened(val entity: MainEntity) : Output() } data class MainEntity( val text: String ) } 60
  20. interface ExampleComponent { interface Dependency { fun userDataSource(): UserDataSource fun

    inputSource(): ObservableSource<Input> fun outputConsumer(): Consumer<Output> } sealed class Input { object DoSomething : Input() } sealed class Output { data class SomethingHappened(val entity: MainEntity) : Output() } data class MainEntity( val text: String ) } 61
  21. interface ExampleComponent { interface Dependency { fun userDataSource(): UserDataSource fun

    inputSource(): ObservableSource<Input> fun outputConsumer(): Consumer<Output> } sealed class Input { object DoSomething : Input() } sealed class Output { data class SomethingHappened(val entity: MainEntity) : Output() } data class MainEntity( val text: String ) } 62
  22. interface ExampleComponent { interface Dependency { fun userDataSource(): UserDataSource fun

    inputSource(): ObservableSource<Input> fun outputConsumer(): Consumer<Output> } sealed class Input { object DoSomething : Input() } sealed class Output { data class SomethingHappened(val entity: MainEntity) : Output() } data class MainEntity( val text: String ) } 63
  23. 2. require no deep understanding to use TIP #1: self-documenting

    high level interface TIP #2: automatic setup 65
  24. interface ExampleComponent { interface Dependency { fun userDataSource(): UserDataSource fun

    inputSource(): ObservableSource<Input> fun outputConsumer(): Consumer<Output> } sealed class Input { object DoSomething : Input() } sealed class Output { data class SomethingHappened(val entity: MainEntity) : Output() } data class MainEntity( val text: String ) } 66
  25. interface ExampleComponent { interface Dependency { fun userDataSource(): UserDataSource fun

    inputSource(): ObservableSource<Input> fun outputConsumer(): Consumer<Output> } sealed class Input { object DoSomething : Input() } sealed class Output { data class SomethingHappened(val entity: MainEntity) : Output() } data class MainEntity( val text: String ) } 67
  26. interface ExampleComponent { interface Dependency { fun userDataSource(): UserDataSource fun

    inputSource(): ObservableSource<Input> fun outputConsumer(): Consumer<Output> } sealed class Input { object DoSomething : Input() } sealed class Output { data class SomethingHappened(val entity: MainEntity) : Output() } data class MainEntity( val text: String ) } 68
  27. 2. require no deep understanding to use TIP #1: self-documenting

    high level interface TIP #2: automatic setup time to reuse: weeks —> minutes 69
  28. SUGGESTIONS FOR BETTER MODULES 1. black boxes 2. require no

    deep understanding to use 3. universal approach 71
  29. 3. universal approach Reflexes: • Different approaches per level of

    hierarchy • View, Fragment, Activity, ViewPager, ??? 72
  30. SUGGESTIONS FOR BETTER MODULES 1. black boxes 2. require no

    deep understanding to use 3. universal approach 74
  31. SUGGESTIONS FOR BETTER MODULES 1. black boxes 2. require no

    deep understanding to use 3. universal approach 4. constraints! 75
  32. SUGGESTIONS FOR BETTER MODULES 1. black boxes 2. require no

    deep understanding to use 3. universal approach 4. constraints! 78
  33. SUGGESTIONS FOR BETTER MODULES 1. black boxes 2. require no

    deep understanding to use 3. universal approach 4. constraints! 5. structure 79
  34. 81

  35. 82

  36. 84

  37. SUGGESTIONS FOR BETTER MODULES 1. black boxes 2. require no

    deep understanding to use 3. universal approach 4. constraints! 5. structure 85
  38. SUGGESTIONS FOR BETTER MODULES 1. black boxes 2. require no

    deep understanding to use 3. universal approach 4. constraints! 5. structure 6. limit visibility 86
  39. 87

  40. 88

  41. 89

  42. 90

  43. 92

  44. 93

  45. 97

  46. 98

  47. Addressed those issues + Tons of other cool things! +

    (hopefully) better tutorials Badoo/RIBs https://github.com/badoo/RIBs Diff: 108
  48. KEY IDEAS TODAY 1. Focus on the level between classes

    and the whole project 2. Create strong boundaries to avoid coupling 3. Abstract away from screens 4. Keep things similar 5. Keep things simple