Answer the question
In order to leave comments, you need to log in
How to organize a project structure using the MVP pattern?
I understand that 3 layers are needed. But what about the whole application. Let's say I have several Views with registration / authorization, 1 presenter for them and, accordingly, the logic of communicating with the database. I then have tabs that carry their logic. Each has its own presenter and its own logic in model. How to place all this? Where to put contracts between View&Presenter. It occurs to me to create 3 folders - View, Presenter, Model. But where to put the files for the work of Retrofit, various adapters, etc.? I know there is a clean architecture, but I only need to use this pattern. Thanks for the help!
Answer the question
In order to leave comments, you need to log in
MVP is an organization for the view part of an application. It does not describe how to interact with the domain, data part of the application. So it's perfectly possible to have all the components in a module with a relevant ui.
And parts that are not related to ui, the logic of the application (database, network, logic, model) can be separated and stored in their modules.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question