Mark Lurie

    Mark Lurie

    3 months ago
    Hey all, I’m working on a large scale project which is written in a legacy arch (started in 2019, yet written in MVC & Dagger). I was given the opportunity to research for a while & decide on an arch change. I’d like to ask you for advices and best practices on refactoring my project. I’m studying the differences between MVVM & MVI and the new DI frameworks (Koin/Hilt?) Thank you!
    c

    Chris

    3 months ago
    What problems does the current project give you that you feel you need to change? That would be the first question I ask myself.
    Mark Lurie

    Mark Lurie

    2 months ago
    @Chris Good point. The project is written in MVC as i stated. It contains a load of boilerplate code, for example if i want to implement a new screen with an API call it will contain the following classes:1. NewFragment (Controller) 2. NewFragmentMvc (interface) 3. NewFragmentMvcImpl (View) 4. SomeApiInteractor (interface) 5. SomeAPiInteractorImpl (calls the gateway) 6. SomeAPiGateWay (calls the Repo, which uses the retrofit client). That boilerplate is by itself a ton of headache, but It makes thing very readable and methodological. But more than that, the project development is slow and hard to figure out and fix bugs.
    c

    curioustechizen

    2 months ago
    In addition to what Chris mentioned, I would also take the following factors into consideration while deciding on an architecture: • App size • Team size • App type (an app that is primarily a video player would probably be architected differently than a primarily REST client app which in turn would be different than a Launcher app) • Future direction of the app (in terms of features and scale) In my experience, these factors yield answers that are at a different dimension than what you are looking for. For example if the team size is large, you would probably have more layers compared to a smaller team. However, I don't think any of these factors have a play in MVI vs MVVM or in the DI framework to choose. Those are primarily based on preference.