android10 / Android-CleanArchitecture

This is a sample app that is part of a series of blog posts I have written about how to architect an android application using Uncle Bob's clean architecture approach.
Apache License 2.0
15.51k stars 3.32k forks source link

Where is the MVP's model in the presentation layer? #286

Open zhenghuiy opened 6 years ago

zhenghuiy commented 6 years ago

Hi all. I'm new here.

In my opinion, there is only V and P in presentation layer, is it right?

The domain layer and data layer look like the M in MVP ?

If it is true, why all the articles say that presentation use MVP instead of VP?

St4B commented 6 years ago

Basically, the entities of the presentation layer are your models

mishkaowner commented 5 years ago

@zhenghuiy Response Model is M.

Zhuinden commented 5 years ago

it doesn't exist

piotrek1543 commented 5 years ago

As @Zhuinden said, it does not exist as you you have already data and domain architectural layers for Model purposes. In this particular example presentation contains View+Presenter code. So as you said, V+P is in one module, where M is in data module

I think that helpful might be here this example of clean architecture pattern implementation: https://github.com/bufferapp/clean-architecture-components-boilerplate Here presentation module is an extra layer containing ViewModel/Presenter things, whereas View related code is isolated as another module called mobile-ui.