Questions tagged [mvp]

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

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

In MVP, the presenter assumes the functionality of the "middle-man" (played by the application controller in MVC). Additionally, the view is responsible for handling the UI events (like mouse down, key down, etc.), which used to be the controller's job. Eventually, the model becomes strictly a domain model.

Source: Wikipedia article Model–view–presenter

1962 questions
17
votes
8 answers

What is your favorite GWT MVP Framework?

What is your favorite GWT MVP Framework, and the reason behind your choice? Mvp4g GWTP GWT 2.1 Built in gwt-mpv gwt-pectin guit Other platform (please provide link) Own solution (with boilerplate code?) None Thanks. Updated: Added suggestions 3,…
Lee Chee Kiam
  • 11,450
  • 10
  • 65
  • 87
17
votes
5 answers

MVP Android - Where to save the view state?

I'm with some doubts regarding the state save using MVP on Android. I defined my fragments/activities as views and then implemented the corresponding presenters. My example is simple: I have a activity with some checkboxes and spinners. If the…
Fábio Carballo
  • 3,245
  • 5
  • 26
  • 36
17
votes
3 answers

How to control ListView with MVP Pattern for Android

I'm currently developing an android app using MVP Pattern. When I try to develop an Activity, I should use a ListView. So I'm using Adapter for ListView. But I heard Adapter is similar to Presenter on MVP Pattern. I think if Apdater is smiliar to…
Originerd
  • 694
  • 1
  • 6
  • 12
17
votes
3 answers

How Do You Communicate Service Layer Messages/Errors to Higher Layers Using MVP?

I'm currently writing an ASP.Net app from the UI down. I'm implementing an MVP architecture because I'm sick of Winforms and wanted something that had a better separation of concerns. So with MVP, the Presenter handles events raised by the View.…
Scott Muc
  • 2,873
  • 27
  • 38
16
votes
4 answers

How to organize controllers/presenters in a large JavaFx 2.0 application?

For a project I've been working on a JavaFX 2.0 desktop application (a keytool UI). The way JavaFx2.0 works (in my project anyways), the UI event handling takes place in the JavaFX 2.0 UI classes itself (for example: onclicked() events or property…
Jop
  • 243
  • 2
  • 9
16
votes
4 answers

Composite Guidance for WPF : MVVM vs MVP

I am confused. Maybe you can help me :) I have been following the guidance of CAG and found the MVP pattern very natural to me. Suppose I have a UI-ready Model (for example : implements INotifyPropertyChanged), I use the presenter to bind this Model…
ArielBH
  • 1,991
  • 3
  • 22
  • 38
16
votes
1 answer

What is the difference between repositories and usecases?

I'm creating a chat application using clean architecture, I want to check if the user is logged in when the app starts, and open the login screen if he is not logged in, so my questions are: What is the best way to implement that? Should I make…
Mathew Hany
  • 13,310
  • 4
  • 19
  • 16
16
votes
3 answers

MVP Android - How many presenters?

I have a quick question. I am trying (and struggling) to design my application with the MVP design pattern. Can I ask, for each view (activity, fragment) should I have a separate presenter class? There aren't very many resources I can see online,…
DJ-DOO
  • 4,545
  • 15
  • 58
  • 98
16
votes
4 answers

Android MVP: safe use Context in Presenter

In my app I work with ContentProvider and use LoaderManager.LoaderCallbacks. Fragment (View) public class ArticleCatalogFragment extends BaseFragment implements ArticleCatalogPresenter.View, …
Alexandr
  • 1,891
  • 3
  • 32
  • 48
16
votes
4 answers

MVP vs MVVM - Why?

I was using MVP when I was working with WinForm. But I moved to MVVM when I started playing with WPF or Silverlight. The only thing that I noticed is that we don't need to sync with the data between View and ViewModel in MVVM pattern because of…
Mark
  • 161
  • 1
  • 1
  • 3
15
votes
3 answers

How to use empty view with pagination using paging library android?

How to determine size of data returned before setting adapter? How to use emptyview with paging library? How to set emptyview if pagedlist returns null or no data?
15
votes
3 answers

MVP and UserControls and invocation

I'm having some fun trying to get my head around some MVP stuf, as it pertains to User Controls. I'm using .NET WinForms (or something close to it) and Supervising Controller pattern (well, I think I am :). The User Control is itself part of an MVP…
nwahmaet
  • 3,589
  • 3
  • 28
  • 35
15
votes
1 answer

How can Dagger 2 be used to inject using multiple components into the same object

So I have an ApplicationComponent for injecting singletons into my fragments and presenters, but I'm trying to create a component to inject into the same presenter that the AppComponent does. Something along these lines. @Component{modules =…
Stampede10343
  • 844
  • 1
  • 6
  • 21
15
votes
3 answers

What is the Rails Presenters folder for?

What is the Rails Presenters folder for? What goes in this folder? Why is this folder needed?
atw
  • 5,428
  • 10
  • 39
  • 63
15
votes
3 answers

MVP: Should the View implement a Presenter's interface or vice versa?

I am doing my first steps with GWT. I have a question after reading: Large scale application development and MVP Large scale application development and MVP - Part II In the first example the Presenter defines the interface for the View. public…
Macarse
  • 91,829
  • 44
  • 175
  • 230