The Model-View-Presenter (MVP) architectural pattern that enforces the separation of concerns in presentation logic. This pattern is a derivation of the Model–View–Controller (MVC) architectural pattern.

learn more… | top users | synonyms

0
votes
0answers
118 views

Can MVP be implemented in Android with Activities and Fragments as Presenters and Custom Views?

Lately my team has started considering the implementation of MVP pattern in some of our applications. We followed the several guides and tutorials out there, basically ending up with regular ...
4
votes
2answers
160 views

PHP MVC/PAC - Logged In/Admin checks placement

I have set-up a MVC/PAC-like structure for a web application (unsure if it fits any of these design patterns fully). In short it is: Routing in index.php, which selects the controller and method ...
1
vote
0answers
27 views

Multi-page app using passive-view MVP with multiple presenters - what is the most appropriate way to handle page changes?

I am implementing a multi-page application (think installation wizard) where each page is a separate view, and each view has its own presenter. The model and each of the views is ignorant of ...
6
votes
2answers
230 views

MVP (Supervising Controller) Does the view update the model?

I've been reading about MVP, specifically Supervising Controller. One thing I'm having difficulty wrapping my head around is how the View interacts with the Model. It was my understanding that the ...
5
votes
3answers
109 views

In the MVP pattern, the Presenter must control the call flow of Model methods?

I have a Presenter ( RoomPresenter) and a Model ( RoomModel). My RoomModel have some methods like: void createRoom(RoomData roomData, List<User> users) void addUsersToRoom(int roomId, List<...
3
votes
2answers
132 views

How to use the MVP pattern in embedded systems?

I am defining the architecture for an embedded system provided with an LCD touch screen for interacting with the user. To describe my problem I can use a washing machine provided with LCD touch screen ...
3
votes
1answer
183 views

In MVP pattern should the View instantiate a Model object based on UI contents, or just pass these contents as parameters to the Presenter?

I'm using MVP pattern in an android app that I'm developing. I have basically 4 elements: The AddUserView where a new user can be added: The AddUserPresenter The UserInfo (the pojo) The ...
2
votes
1answer
151 views

Understanding MVP pattern usage in Android

In my current android projects I'm using a sqlite db to store my collections of structured data. The database is accessed by a ContentProvider called by a Loader which updates the UI. It looks like ...
5
votes
1answer
268 views

Who communicates with the database in MVC/MVP?

I am building a small application and want to save my business objects to a database. I have my business objects and a model that acts as a container for my business objects and provides methods for ...
-2
votes
1answer
220 views

Why are interfaces necessary in MVP design pattern?

I am trying to understands MVP using Winforms. I found this example. Why do UserModel and UserView need to implement the IUserModel and IUserView interfaces ?
2
votes
1answer
159 views

Is IntentService an implementation of Command Pattern?

According to Wikipedia: In object-oriented programming, the command pattern is a behavioral design pattern in which an object is used to encapsulate all information needed to perform an action or ...
1
vote
2answers
161 views

A proper way to work with MVC

I got into a debate at work today, I hope you can help me to settle it up. My colleague wants to separate UI, Model, DB, and Network like so: Create an API level between UI and controller, that ...
2
votes
1answer
365 views

Is Activity/Fragment already a presenter?

An Activity or a Fragment is where you handle the logic of updating views with model data. However, they are tighly coupled with the Android's framework. Are these classes already presenters? Bonus:...
4
votes
1answer
158 views

MVP / MVC role of the Model (not anemic one) clashes with presenter / controller role (responsibilities in the right place, Model OR Presenter)?

Problem? I have been looking at MVP implementation and process to design a good domain model (not anemic). It says that the domain model should have its own behavior and not being a simple data model ...
6
votes
1answer
227 views

UI Design patterns for non-screen based project

I'm working on a small project coded in Python that uses a single button for input and a RGB LED as feedback, which responds to button presses and asynchronous events from the network. As the ...
2
votes
2answers
611 views

how can the presenter or view interact with the model in the MVP pattern?

I'm learning the MV* patterns. MVP in this case. I'm trying to refactor an old android application into the MVP pattern to make things less tightly coupled, but I'm struggling one one concept. I know ...
2
votes
1answer
89 views

What layer would an Audio Player Service fall under in a an MVP system?

I'm trying to completely overhaul an app I wrote a while back that plays audio, and I'm learning how the MVP pattern of organization works, but I'm not sure how/where an audio playback service would ...
1
vote
1answer
112 views

Databinding When View Differs From Model

I have an entity Customer. Customer has a collection of Accounts. I have corresponding classes. The Customer class has-a List<Accounts>. I have two views. First page shows the Customer's name, ...
2
votes
1answer
414 views

Best practices for MVP pattern on Android

my team has had great success introducing MVP and the associated unit tests that go with the presenter. We are wondering how granular we should make the interaction between the View and the Presenter....
0
votes
1answer
81 views

Beginner's UnitTests for MVP Presenter class

In my application, I have a user settings form with roughly 20 checkboxes and a few other controls. The checked state, enabled state and texts of these controls are bound to about 60 properties of the ...
2
votes
1answer
1k views

Communication between Multiple Presenters in MVP

I'm designing an application using the MVP pattern, but a few of the edge cases for the system rely on communication between multiple presenters. View 1 calls Presenter 1 which does Operation A ...
2
votes
3answers
346 views

How to reuse common code between presenters

In my application there are 2 views both have 70% common fields like name, icon etc. One view is about list( contains 2-3 fields). On clicking the list , the next view which is the details should be ...
14
votes
4answers
726 views

Proper Model-View-_____ design

I've been reading up about Model View Controller, Model View Presenter, Model View ViewModel, and so on, and generally, the underlying concept seems pretty simple to understand: keep the pretty ...
2
votes
1answer
1k views

How can one presenter be used for multiple views in MVP

I am using MVP for creating an android application, which takes data from server and sets to activity. I am forced to create one presenter for each view. Each view is unique because each view has ...
1
vote
0answers
308 views

How should one handle a Parent-Child relationship using MVP?

In a conventional MDI WinForms application, one would go like this: public partial MainMdiForm : Form { public MainMdiForm() { InitializeComponent(); } private void ...
1
vote
0answers
40 views

Is selection in Taligent MVP assumed to be a Selection Model?

By reading the traditional Taligent paper, I can't find a definite answer to what they mean by Selection. The selection could be just a set of indices referring to entries in the Model, so that a ...
1
vote
1answer
303 views

Should the Presenter depend on the View or the vice versa?

So far, I have used the MVP architecture pattern a few times. Every now and then, I wonder whether my Presenter should depend on my View or vice versa, that is the View depends on my Presenter. NOTE ...
1
vote
0answers
73 views

Avoiding IllegalStateException in MVP when view is not ready yet

In an effort to improve my coding skills I am trying to make use of the MVP pattern in one of my first Android applications. It is going well but I have hit one issue that I am not sure what is the "...
-1
votes
2answers
579 views

Where and how to reference composite MVP components?

I am learning about the MVP (Model-View-Presenter) Passive View flavour of MVC. I intend to expose events from view interfaces rather than using the observer pattern to remove explicit coupling with ...
-1
votes
1answer
607 views

Decomposing a system in to sub systems, modules and components [closed]

This question is about how should a large system be decomposed to sub systems, modules , components etc. For example lets say in a Payroll solution there may be core areas like Attendance, Salary ...
3
votes
1answer
643 views

Showing a View from another View in MVP

This question is regarding MVP triads. Lets say I have two triads and first one has View1, Mode1 and Presenter1. Second triad has View2, Model2 and Presenter2. Now what I trying to do is, I just want ...
1
vote
1answer
923 views

Presenter accessing the value in text box using sender object

I have following method in my presenters which validates the user inputs on the UI. Basically to capture the value of the text property of the text box, it uses sender object which was passed in by ...
1
vote
2answers
628 views

Using Statement lambda in exception handling

Following is a code snippet from MVP Win Forms application and this explanation would be helpful when answering the questions. My DAL doesn't handle exceptions and it will be propagated up to the ...
1
vote
1answer
482 views

Exception handling in WIn Forms application

When handling exceptions for example in a method in my presentation logic, is it ok to catch all possible exceptions in a one catch block as follows if the only purpose here is alerting the user. ...
1
vote
1answer
414 views

DAL Exception handling in a MVP application

In a MVP win forms application I'm handling exceptions as follows in DAL. Since the user messaging is not a responsibility of DAL, I want to move it in to my Presentation class. Could you show me a ...
2
votes
0answers
197 views

Handling permissions in a MVP application

In a windows forms payroll application employing MVP pattern (for a small scale client) I'm planing user permission handling as follows (permission based) as basically its implementation should be ...
0
votes
2answers
2k views

How to design console application with good seperation of UI from Logic

Is it considered an overkill for console application to be design like MVC , MVP or N tier architecture? If not which is more common and if you can link me to simple example of it. I want to ...
1
vote
1answer
674 views

Again MVVM / MVP story , passing interface of a view to its view model why it is bad?

I have used WPF for an Enterprise solution (hundreds views heavily used Data inputs and validation) in MVP pattern (it was a clean solution usually small amount of code behind forms and main code was ...
2
votes
0answers
151 views

How much segregation is too much in this design?

We are working on ASP.NET webforms application developed using WCSF (MVP pattern). In the application, there is a search screen that allows the user to enter some fields and display the results. We ...
0
votes
0answers
71 views

MVP: Multiple Page-Controllers for a page?

I'm refactoring a big-scale ASP.NET application written with WebForms which has a very unflexible design of view+code-behind. For this refactor, I'm using MVP Architecture (Model-View-Presenter), ...
4
votes
1answer
259 views

Designing storage service data structure for decoupled models sharing same data

Surely most of you remember the Norton Commander application where similar (sometimes the same) data is displayed in separate decoupled views. I'm building a web application that follows the same ...
4
votes
1answer
903 views

Loose Coupling Presenter to View in MVP

We work in a Java shop here and our web application uses an implementation of the MVP architectural pattern. Our manager comes from a .NET world, where he has been exposed to the MVVM design pattern. ...
2
votes
1answer
189 views

MVP pattern and references

I am doing a Windows C# application. I asked this question and I was told that the viewer/presenter should never know anything about the model. Does this mean that I should not add a reference of my ...
1
vote
1answer
170 views

Further decoupling using static libraries

I've been thinking for a while about reasons that prevent a lot of programmers — myself first of all — from writing clean, modular and expressive code while developing, for example, CocoaTouch apps. ...
5
votes
2answers
171 views

design in agile process

Recently I had an interview with dev team in a company. The team uses agile + TDD. The code exercise implements a video rental store which generates statement to calc total rental fee for each type ...
2
votes
2answers
2k views

MVP Implementation at the UserControl Level

I'm trying to figure out how MVP should be implemented at the UserControl level. I thought I had it, but I ended up reading a blog post that pretty much shut me down. Now I'm back at the start and ...
5
votes
2answers
623 views

Javascript Architectural Model

Are there any obvious flaws to this OO architectural model which I intend to implement using javascript? It is similar to the MVP model but instead the role of the model is broken down into three ...
0
votes
1answer
303 views

MVP Pattern - Ways to restrict the user action based on security privilleges

In an MVP application, what should be the most appropriate way to implement restriction to some UI actions based on the current user's privileges? For example, in a role-based security, different ...
3
votes
2answers
387 views

Should a Presenter or a View sort data in an MVP application?

A typical MVP application might have a View method such as: void setDisplayItems(List<DisplayItem> items); Should the Presenter sort the list of items or is that a task for the view? I ...
3
votes
2answers
4k views

How to synchronize client and server model objects?

We have a client-server application with a thick client (GWT). There are client-side MVP presenters (MVC controllers) which hold references to some objects viewed in the GUI. Some user actions cause ...