TrueCaller Url Hit App. To implement the app I have used Mobius Architecture using Test Driven Development written in Kotlin. Following is a deep dive into the implementation.
In the diagram,
- The nodes represent different Models
- Arrows represent Events
- Dotted arrows adjoining the little circle represents an Effect
- Nodes with dotted borderline represent a No Change Model
- Mobius is an Architecture introduced by Spotify which follows the Mobius Loop.
- Start from the
TrueCallerUpdateTest
class. Update function is the heart of Mobius Loop. All the events pass through the update function and then dispatch the next model or an effect. - Effects are impure functions. Things like making a network call or showing a toast message are done in the
TrueCallerEffectHandler
class. TrueCallerViewRenderer
class implements the 3 algorithms for displaying needed output.- Unit Tests are written for the above classes in
TrueCallerViewRendererTest
,TrueCallerEffectHandlerTest
, andTrueCallerUpdateTest