Skip to content

Clarification on Mobius Controller #158

Open

Description

@rajdheepak
    @pettermahlen We are mostly using mobius loops with viewmodel across our app. 

What is the use case for a mobius controller?

Can Mobius Controller be thought of an equivalent to VM with loop?

Could you give me actual example use cases for Using Mobius controller over VM with loop?

Originally posted by @rajdheepak in #157 (comment)

Activity

  1. togi commented on Nov 16, 2022

    @togi
    Collaborator

    The controller it's just an utility to be able to interrupt and continue a loop from its last state, plus it helps set up the cyclic dependency between UI and business logic. The controller predates MobiusLoopViewModel, and if you use MLVM then there is no need to have a controller.

  2. rajdheepak commented on Dec 6, 2023

    @rajdheepak
    Author

    Any thoughts/suggestions on how does Mobius architecture glue into the android paging library? I am guessing you must have a lot of paging stuff in spotify, some insights please.

    What are we doing now? TLDR- VM holding the loop is supplied to the data source which uses VM instance to dispatch events and observe states which eventually updates data on callbacks in loadBefore/loadAfter.

    @togi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions