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
15
votes
1 answer

What are the differences between MVC, MVP and MVVM?

From what I can gather, the first two don't seem that different. Whether it's called a controller or presenter, it still seems to have the same mediation functions. MVVM seems a little different in that the controller seems to be more of a part of…
paxdiablo
  • 854,327
  • 234
  • 1,573
  • 1,953
14
votes
1 answer

Clojure GUI programming is hard

I am writing a utility program using a Swing GUI. I am trying to use Martin Fowler's Presentation Model to facilitate testing. My application will automatically store several user preferences using java.util.prefs.Preferences (i.e.: main window…
Ralph
  • 31,584
  • 38
  • 145
  • 282
14
votes
2 answers

GWT MVP with Places & Activities - Where's the Model?

I'm trying to familiarize myself with the "Places & Activities" design pattern for GWT development, and so far I think it has a lot of potential. I especially like the way how once you start thinking about your application in terms of "Places",…
Andreas Baus
  • 2,556
  • 3
  • 16
  • 21
14
votes
1 answer

"Illegal characters in path." Visual Studio WinForm Design View

I am putting together a lightweight MVP pattern for a WinForms project. Everything compiles and runs fine. However when I attempt to open the WinForm in design mode in Visual Studio I get a "Illegal characters in path" error. My WinForm is using…
jacksonakj
  • 882
  • 1
  • 11
  • 21
14
votes
4 answers

Difference between asp.net MVC and MVP? are they both same?

I wanted to know the difference between asp.NET MVC and MVP, are they both same? below is the architecture diagram I referred. (Image URL:http://msdn.microsoft.com/en-us/library/ff647859.aspx) the major difference I got to know between MVC and MVP…
Dalton
  • 1,334
  • 1
  • 11
  • 19
14
votes
4 answers

MVP dependency injection

using MVP, what is the normal order of construction and dependency injection. normally you create a presenter for each view and pass the view into the presenter on constructor. But what if you have: A Service that multiple views need to listen to…
leora
  • 188,729
  • 360
  • 878
  • 1,366
14
votes
3 answers

Critique my simple MVP Winforms app

I'm trying to wrap my mind around the MVP pattern used in a C#/Winforms app. So I created a simple "notepad" like application to try to work out all the details. My goal is to create something that does the classic windows behaviors of open, save,…
Keith G
  • 4,580
  • 5
  • 38
  • 48
14
votes
4 answers

Unit Testing Front End Logic

We have tried to introduce unit testing front end logic on a recent project and the value of the tests are being questioned. We were not code reviewing the tests so the quality of them is poor, developers copied poor tests creating more poor tests…
Burt
  • 7,680
  • 18
  • 71
  • 127
13
votes
3 answers

Realm, RxJava, asObservable() and doOnUnsubscribe()

In my Android projects, I use realm as my data storage engine. I love it! I also use RxJava because it makes "threading" so much easier, and I really like the whole "reactive mindset". I love it! I use an MVP pattern + some "Clean architecture"…
Tudor Luca
  • 6,259
  • 2
  • 29
  • 44
13
votes
2 answers

Failed to create an instance of Service via deferred binding

I have been trying to build a GWT / Google App Engine web app using the mvp4g framework. I keep getting an error about Failing to create an instance of my Service via deferred binding. My Acebankroll.gwt.xml file looks like:
Sergio del Amo
  • 76,835
  • 68
  • 152
  • 179
13
votes
3 answers

GWT Best Practices - MVP

A question for all the GWT gurus out there. I'm a newbie in GWT and am trying to understand the best practices of coding a GWT application. I have gone through "Large scale application development and MVP" based on Ray Ryan's talk at Google I/O…
GWTNewbie
  • 395
  • 4
  • 16
12
votes
2 answers

How to apply composition in android MVP?

Recently I took over an android project which is built on top of MVP. While simple screens are quite straight forward and easy to read and maintain, the more complex parts of the app are not. Multiple inheritance levels have caused me days of…
stoefln
  • 14,498
  • 18
  • 79
  • 138
12
votes
2 answers

How to share data between two presenters in MVP architecture in Android?

Here's an example scenario: I have an activity (view) and a presenter for that view. The presenter fetches a list of users from a network API and holds it in memory using a List object. The activity contains different types of fragments to display…
XenoChrist
  • 571
  • 4
  • 13
12
votes
2 answers

Can I register MVP Presenter inside Fragment

I've been following MVP design pattern provided by Google to refactor my application. I have one MainActivity and many Fragments and it seems little be messy for me to create an activity for every fragment, so I've been thinking to register…
MilanNz
  • 1,323
  • 3
  • 12
  • 29
12
votes
2 answers

Need Context in Model in MVP

I need to use the Context of activity in the model while using MVP in android to get the list of all the installed application.what is the correct way to access the context or any alternative to achieve the same while following the MVP pattern. Here…
Harish Sharma
  • 360
  • 1
  • 2
  • 7