Mvp

Model View Presenter (MVP) is a derivative of the model-view-controller software pattern, used mostly for building user interfaces.

Presenter

In MVP pattern the presenter acts upon the model and the view



Design iproducteditorview parameter

Example

"As for your existing architecture mvp it is better to put the logic in the presenter actually there should not be any logic on the view in your case custom view aside from taking input eg click of a button and providing output"

from question  

Is it a good idea to add a WebService Request inside a Custom View?

"This is a problem because you use mvp for decoupling view and presenter but this design makes them tightly coupled;your presenter does not need to know about your view so you can remove iproducteditorview parameter from the presenter constructor"

from question  

Model View Presenter Interface question?

Web pages interfaces

Example

"I prefer mvvm over mvp for the below reasons reactive mvvm is short term for model view viewmodel where view model is a similar layer of abstraction over presenter which provide data to view"

from question  

Login MVP with retrofit

"I have been searching on the net and i made a couple of examples of both of them but i m even more confused because in some sample web pages mvp uses more than 2 interfaces to communicate the presenter with the view layer some ones even have completely blank interfaces only declarated but in other ones it only takes two interfaces to transport data from presenter to view"

from question  

Programming Pattern: MVC vs MVP

Others

Example

For example in an mvp -based web application;now another class such as a presenter is less likely to depend on the standardnavigator implementation and more likely to depend on the inavigator interface since the standardnavigator implementation would need to be cast to an interface to make use of the redirect method

from question  

C# Interfaces. Implicit implementation versus Explicit implementation

Also this way mvp pattern becomes more testable as you can mock the view with fake object and test your presenter in unit tests

from question  

Interface and class in MVP

Since the flow of logic is still basically a loop but the api boundaries of the presenter is a cleaner boundary than view in mvp which helps decouple v and m in mvp than is possible in mvc

from question  

JavaFX: MVC naming conventions

From my experience a strongly enforced mvp pattern has been much better for data centric complex lob applications;mvp offers greater seperation as your presenter have no knowledge of web centric concepts

from question  

ASP.NET MVP vs ASP.NET MVC

To summarise the differences controllers in the mvc have more control over the ui and handle events while a presenter in the mvp is more passive and just presents information through the ui

from question  

What is Model View Presenter?

Here is a mvp sample using dagger rxjava and retrofit which might help you to learn more about mvp in android;context is a part of android view layer in mvp so presenter must not have any idea about it and you should not pass it to presenter

from question  

Android MVP: which layer should store context variable

The use of a presenter is closer to mvp and gets away from the dependency injection model advocated by apple mvc

from question  

Passing information between controllers in a Swifty (/protocol) way?

Mvp is not better than mvvm they just fit in different ecosystems;presenter and viewmodel are as their names imply ui beasts

from question  

Some confusion about MVP and MVVM

One guy from here told me that mvvm is better than mvp he told me many pros and many conts but i d like to know if my mvp is well done or if you know any other way maybe to convert to mvvm. it s a sign in with google mvp. i won t put all of the code but i ll put the folders and little explanation -model user simple user pojo class -presenter i have an object of my igoogleloginview where i call the methods but here i have the logic creategoogleclient signin onactivityresult onstop onstart ondestroy all of those methods are from my interface inside the same package igooglesignin igooglesignin - all of the methods from the presenter class -view googlesignin gotomainactivity and then i have my mainactivity where i call the methods.

from question  

MVP to MVVM Android

You might be using mvp mvvm mvi etc;gui architectures in which case some other presenter object is more likely to manage the button than is the activity

from question  

Why implement the onClickListener instead of just setting the onClick attribute to a defined method in the Activity class?

Or example in mvp you can either directly bind the model to the view or properties of the model individually that you map on binding;you can also call methods on the presenter directly or raise events that the presenter responds to more indirectly

from question  

What are the alternatives of Module View Presenter(MVP) design pattern?

Mvp could not be simpler which is why i start with it;the viewmodel is replacement for the unidirectional presenter it s a state-tracking bidirectional equivalent

from question  

Confustion in Concept of MVVM

In the classic mvc pattern both the view and controller access the model whereas only the presenter has access in mvp;also note that in mvp not all business logic is necessarily located in the presenter

from question  

In a MVP design pattern, who is responsible for accessing the database

Back to Home
Data comes from Stack Exchange with CC-BY-SA-4.0