Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [mvp]

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

Filter by
Sorted by
Tagged with
16
votes
2answers
3k 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 ...
15
votes
3answers
1k views

Calculate balance wages

In the following code I'm trying to calculate Net Wage of employees and classes Earning, Deduction and ...
15
votes
1answer
582 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 ...
13
votes
1answer
894 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 ...
11
votes
2answers
358 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 ...
11
votes
2answers
241 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 ...
10
votes
1answer
139 views

PanelScrollable - a reusable class for rendering a changeable number of panels

This class (PanelScrollable) is part of my view package, in an MVP designed Java Swing system. I am not using any MVP frameworks,...
8
votes
3answers
17k 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
898 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 ...
8
votes
1answer
129 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 ...
7
votes
2answers
446 views

Follow-Up Post Tictactoe now with AI

A month ago I finished and posted my first version of my Tic-Tac-Toe, I received a lot of good feedback and refactored it to more closely suit the MVP design pattern. I've done some further clean-...
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 ...
7
votes
1answer
673 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 ...
7
votes
1answer
1k 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 ...
7
votes
0answers
130 views

Free body diagram generator using MVP for VBA

Based on my understanding of Model View Presenter (MVP) I have it generate a diagram. Is this a correct implementation of MVP? What deficiencies are there in my implementation? UI Generated diagram ...
6
votes
2answers
698 views

Proper handling of exceptions in MVP

In my DAL currently I'm handling exceptions as follows. Is it in an acceptable level? Note : I'm using MVP in this Winforms application. ...
6
votes
1answer
284 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 ...
5
votes
6answers
118k 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 ...
5
votes
4answers
421 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 ...
5
votes
3answers
472 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. ...
5
votes
2answers
263 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 ...
5
votes
1answer
2k views

Calculating Earnings from attendance details

In a C# win forms payroll application I need to calculate employee salary based on their attendance. I've written a stored procedure which calculates earnings of all employees from the data available ...
5
votes
1answer
696 views

MVP win forms application

In a module of a win forms application I have a hierarchy of classes like BaseRecovery, LoanRecovery and ...
4
votes
2answers
709 views

DAL Returns a collection of business objects in MVP

In Model View Presenter (MVP) pattern, it is said that our DAL always should returns business models. If I want to get a list ...
4
votes
2answers
237 views

Using built-in type Decimal or Entity type Advance, to hold AdvanceAmount

In a wage processing system which employees MVP pattern We have Model classes WageInfo, EarningInfo, ...
4
votes
1answer
4k views

Populating a Data Grid View in MVP

I'm developing a win forms application in MVP pattern. In the application, there is a small module to show the branch offices (called points) where the attendance entering process has been completed. ...
4
votes
2answers
235 views

Server side validations and unit testing in MVP

We are following passive controller approach and when user clicks on submit, server side validations are fired. There are many other fields on the screen that needs to be validated. I would like to ...
4
votes
1answer
2k 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 ...
4
votes
1answer
134 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 (...
4
votes
1answer
211 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 ...
4
votes
1answer
5k views

Using model view presenter (MVP) in C# code

I'm a beginner to Model-View-Presenter pattern and I'm finding a way to use it in a sample application In my C# winforms application has a Employee Class and it ...
4
votes
1answer
254 views

Follow Up post: Proper handling of exceptions in MVP

This is a follow up post of my early question "Proper handling of exceptions in MVP" So based on the answers I re edited the post and now my exception handling code looks like this... DAL ...
4
votes
1answer
111 views

Using a UserPermissionService by all Presenters in the Application to control the access to commands

I'm handling user permission in a MVP Winforms application as follows. Here I'll give a full detail of my code as it will be helpful when answering to this question. My user model has a list called <...
4
votes
2answers
397 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 ...
4
votes
1answer
281 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 ...
4
votes
0answers
55 views

Winforms MVP Validation

I have a Winforms MVP application where I need to use the ErrorProvider on the view. I have added the following methods to my presenter to allow me to show the ErrorProvider but it just doesn't feel ...
3
votes
1answer
1k views

Employee wage/salary calculation MVP solution - follow-up

This is a follow-up to this post. In this project (C# Win forms) I'm supposed to calculate wages of employees. These are the steps: Calculate earnings from Attendance data. Here all regular ...
3
votes
1answer
144 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
3answers
498 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 ...
3
votes
1answer
2k 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 ...
3
votes
1answer
292 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
2answers
931 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 ...
3
votes
1answer
817 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 ...
3
votes
1answer
4k 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 ...
3
votes
1answer
2k views

Exception handling with expression lambda in Presenter class

Following is a code snippet from MVP Win Forms application. My DAL doesn't handle exceptions and it will be propagated up to the calling method in the presenter classes where the exception will be ...
3
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 ...
2
votes
3answers
3k views

Employee wage/salary calculation MVP solution

In this project (C# Win forms) I'm supposed to calculate wages of employees. These are the steps: Calculate earnings from Attendance data. Here all regular earnings like ...
2
votes
2answers
958 views

MVP Pattern used in a payroll solution

I'm using MVP pattern for a payroll system as my final year project. There are about 16 entity classes (like employee, client, <...
2
votes
1answer
217 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 ...
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 ...