Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [mvp]

Model View Presenter is a Derivative of MVC, used for creating user interfaces.

2
votes
0answers
46 views

Timer application in MVP

I create simple Android timer application and I try to use MVP design pattern. I read some tutorials and after that I started writing code. My code is working correctly and as intended. There is ...
1
vote
0answers
46 views

Consuming APi using Rx in an MVP project

I would like to have some input here if possible, this code should make a request to an API and the call should return the desired object. The client to make the requests was made with Retrofit and ...
0
votes
0answers
38 views

Hello World Android App

I wrote a simple Hello World app for Android that does the following: Accepts a name Allows the user to select a language Opens a new activity that greets the user in the language selected by the ...
2
votes
1answer
106 views

About handling data from an API call through RX and Retrofit

I started using Retrofit and RxJava recently and I love it. I am working on an Android project and I am following MVP Repository pattern as specified in Android Architecture Components. I'm still ...
8
votes
1answer
269 views

MVP Passive-View

First of all, I'm really new to the MVP design pattern (Passive-View) and I've been trying to implement it in a WinForms application. Before I'm going any further, I'd be very happy if you guys can ...
1
vote
0answers
637 views

Using Asynctask with MVP architectural pattern

I am working on a simple android app to learn MVP. I am using synchronous OkHttp with AsyncTask for retrieving data from a REST ...
3
votes
2answers
259 views

Simple MVP Name-Finder

I've recently learnt about the Model-View-Presenter architectural pattern and I wanted to give it a go with a simple VBA project. The aim is to retrieve a person's name from a UserForm. The ...
1
vote
0answers
37 views

Android application using RecyclerViews to list games in a Fragment

I am implementing MVP architecture, code works fine, I wanted your suggestions if I there can be improvements done or in any areas where I am not following the pattern correctly. It is a simple ...
1
vote
0answers
279 views

Is this how to implement MVP and ICommand patterns in WinForms?

I'm learning about the MVP and ICommand design patterns as I'd like to use them in my own projects. I've cobbled this very simple WinForm application together to hopefully demonstrate that I'm using ...
2
votes
0answers
49 views

Filter results on response

I call remote server to get my result. Result might contain artist,track and album depends on API method but there will be only one response (artist or track or album) at a time. It mean the other two ...
2
votes
0answers
59 views

Choosing structure of fields validation module in Swift

I've implemented abstract module for fields validation according to this MVP clean architecture repo. In a nutshell I've created ValidationGateway protocol ...
3
votes
2answers
436 views

Login window in Swing using MVP

I am trying to grasp MVP (like so many) and although there are quite a few resources out there, I'm not sure I really get it. I am trying to do this without frameworks to really see what's going on. ...
6
votes
1answer
216 views

TicTacToe in MVP Winforms

I took the source code from this question, (thank you gaessaki for the motivation!) and did a lot of refactoring. I use 4 projects: Common: contains mainly interfaces and enumerations referenced by ...
2
votes
0answers
2k views

Repository pattern with Specification queries

I'm working on an Android (Java) project which utilizes different analytic metrics (sum of x group by date, sum of x group by id, etc) and I am projecting the data sets into different charts using ...
1
vote
0answers
49 views

Two priests talking to one another

It's a part of code where two Threads ("priests") talk to each other. One asks and waits for the second to answer - then something happens depending on what has been answered by second thread. I ...
3
votes
1answer
79 views

Looping through the values of two ComboBoxes by pressing a button

I have a C# application where I have implemented the MVP pattern. On one of my forms I have two ComboBoxes with values through which I loop with a button press. The first ComboBox contains different ...
3
votes
1answer
242 views

Tic Tac Toe implemented in WinForms using Model-Viewer-Presenter Pattern

I had to build a 2-player Tic Tac Toe app in C# w/ WinForms for a pre-interview screen. I got past that stage successfully and the app works flawlessly, but I would like to get some feedback. ...
3
votes
3answers
273 views

Presenter creating Views in c# MVP

I have a c# WinForms application in which I have tried to implement the Model View Presenter pattern with Passive View. I create new Views in the Presenter of my 'home screen'. I was wondering if this ...
4
votes
1answer
850 views

Passive View implementation in c# MVP

I have a c# WinForms application in which I have tried to implement the Model View Presenter pattern with Passive View. The View derives from a parent IView which propagates the public members and ...
1
vote
2answers
214 views

Checking a Model's function's return value and setting values to a View member

I have a WinForms project that uses the Passive View MVP pattern. In the Presenter of one of my Views I have a function that gets questions and from its Model. But I want to make sure these ...
1
vote
0answers
310 views

Handling a user control that needs to be put on my form in WinForms project using MVP pattern

in my application i have a form 'DetailScreenView' which implements 'IDetailScreenView'. It is connected to 'DetailScreenPresenter' by the Passive View MVP pattern. I also have a '...
2
votes
1answer
396 views

Handling an openFileDialog in the View of my MVP WinForms project

I have a WinForms project in which I am trying to implement the Passive View MVP pattern (meaning no business logic in my Views). Each form is a concrete View with an IView interface to which a ...
1
vote
0answers
2k views

Android Login Screen implemented in Model-View-Presenter Pattern

So this is my first time implementing the MVP pattern in Android. As I understand the presenter should not contain any Android specific code. I am using ...
2
votes
2answers
2k views

Android MVP Adapter

While implementing Android Activity component using MVP pattern a discussion arose - who should be responsible of creating list adapter - view or presenter? If ...
2
votes
0answers
135 views

C# Winforms MVP (avoiding circular dependencies)

I asked the following question on stackoverflow and as a result came up with the following code to avoid circular event logic when using winforms. There are two occasions where my model can be ...
5
votes
3answers
471 views

Does this method contain multiple implementations?

My teammate and I have a small discussion about the responsibility of a method. He thinks next method has two responsibilities and I think that only one. ...
11
votes
2answers
245 views

Chutes & Ladders Board Generator (June 2016 Community Challenge)

This is an "entry" I made for the June 2016 Community Challenge to make a Chutes and Ladders generator. It generates a random number of chutes and ladders with a total delta of -50 and displays their ...
4
votes
1answer
126 views

PDF conversion and time stamp tool

This is the latest edition of my PDF tool, previously mentioned here, here, here, and inspired by my first attempt at a MVP here. Major differences from previous editions: It uses the MVP pattern (...
3
votes
1answer
1k views

Model-View-Presenter Winforms app

This is my first attempt at a Model-View-Presenter pattern Winforms application. The model is a class that stores a bunch of primitives, and the view is a ...
5
votes
2answers
207 views

Menu Model class using Model-View-Presenter

The following code is for my Object Oriented Programming class. My program simulate the cashier's machine to order food. The code uses Model View Presenter. This class is the model. I have an ...
7
votes
1answer
622 views

iOS delegation design pattern

I am working on a project that has a Model-View-Presenter structure and use the delegation design pattern that has the following structure/implementation. I would love feedback. The ViewController ...
14
votes
1answer
389 views

Simple dictionary storing/viewing application

A TreeView on the left which just displays a list of files saved by the application. A DataGridViewon the right to display data ...
3
votes
2answers
717 views

Linq-to-SQL DAL on a Windows Forms project

I just started out a new job as a C# programmer on .NET 3.5. My manager gives me total independence on how I build my modules, which is generally a good thing, but there are minuses too. Having too ...
11
votes
2answers
234 views

Exploring the code of the Code Explorer

The Code Explorer is a dockable toolwindow that displays a TreeView that shows all opened VBA projects and their respective modules, but unlike the "native" Project Explorer, Rubberduck's explorer ...
1
vote
3answers
2k views

Dealing with DB Through EF within Winforms

I have the following code which uses EntityFramework to reach out to a DB and retrieve data to populate into a Winform application gridview. I am still quite new ...
4
votes
1answer
158 views

Model-View-Presenter

I work on a .NET application that very loosely follows an n-tier kind of architecture (the business objects (not logic) and data access are split out). We are now looking to start refactoring the code ...
7
votes
2answers
1k views

Implementing both poor-man's MVP and MVPVM framework

I'm actually building some kind of framework to promote code reuse without over-reusing it. Besides, sometimes as it occurs with generic types, one expects type parameters to be constrained for the ...
5
votes
4answers
391 views

Selecting employees and updating a DataGridView

I've been reading up on different design patterns, mainly MVP and different adaptions of this design pattern / architecture. Now, I've decided to have a little play with my own ideas, the main ...
3
votes
1answer
764 views

Implementing ViewModel design pattern using DI in a MVP-VM architecture

Based on this answer: MVVM implementation using C# and XAML, I understand that my ViewModel is some kind of a wrapper for my Model. Being a fan of DI and SOLID principles, I have made my ViewModel ...
7
votes
1answer
956 views

Handling Parent-Child Relationship using MVP within a WinForms Application

I recently asked on Programmers: How should one handle a Parent-Child relationship using MVP? Based on the comments received, I tried this: IParentView ...
4
votes
1answer
230 views

Properly using parameterized Factory.Create() method using DI

My factory is using method injection because I thought this was the best way to make it so far. Besides, I doubt it is a good thing after having to call on its ...
6
votes
3answers
13k views

Throwing exceptions when validation fails

When I want to check the validity of an attendance being entered into the system, I perform following action. AttendancePresenter Class ...
8
votes
1answer
117 views

Honey I shrunk the view

Going down the rabbit hole, I wanted to be able to change the size of a form, and not have to worry about the layout of the controls. vba doesn't support user-resizeable forms, but forms still have a ...
14
votes
2answers
2k views

Down the rabbit hole with MVP

Following-up on this post where I implemented a Repository Pattern in vba to abstract ADODB and enable testing my Excel app without hitting a database backend; curious about how far vba would let me ...
12
votes
1answer
765 views

Abusing Excel VBA… to maintain data stored in a database

I need to build a little UI to allow easy maintenance of some data stored in a MySQL database, and the end user wants to do that in Excel (I know, I know). The code I came up with comes pretty close ...
2
votes
1answer
7k views

Binding data to a ComboBox and then showing ValueMember in another TextBox

I have a comboBox and a TextBox in the View and when the view is loaded, the ...
3
votes
1answer
3k views

Binding a DataGridView to a List

I'm new to Databinding in MVP and I want to bind my DataGridView to a object list. This grid may be populated in two ways. There are TextBoxes in the form and users can enter text, and when they ...
2
votes
1answer
644 views

Using a single validation handler for all controllers in a form

In input validation I'm using this validation method in my all Forms. Here I have a single handler for all TextBoxes in my Form and if I have other controllers like ...
5
votes
6answers
102k views

Input validation for text boxes in a Form

In a Win Form I'm doing initial validation in the Form. So before saving data, I want to validate whether all the required fields are filled (Text Boxes) by the user. There are about 18 such Text ...
2
votes
1answer
322 views

Calling a copy constructor in Presenter to prepare a list of Models

I'm new to MVP. In a presenter I have following code. Here what am I trying is to create a list of Model objects (in this case ...