Questions tagged [passive-view]
46 questions
0
votes
0 answers
Trouble understanding Passive-View in MVP Winforms C#
I'm trying to use the MVP (Passive View) pattern in a Winforms application. As far as I understand, in the Passive View implementation of MVP, the View doesn't know about the Presenter, so I need to communicate with it somehow. I'm using events for…

Vahid
- 5,144
- 13
- 70
- 146
0
votes
3 answers
How to implement MVP Passive View in an android application?
I recently started building an android application and I would like to use an design pattern right from the scratch. I was told that MVP (Model-View-Presenter) is a good pattern for android applications.
I was wondering if it's possible to…

marcs
- 73
- 7
0
votes
1 answer
Who should create UI elements?
I've got an WinForms application that uses MVP and I'm not entirely sure how to approach the scenario of when I need to create new UI elements.
For the sake of example, let's say my view has a button which is supposed to open a new view (Form) as a…

Jake
- 1,701
- 3
- 23
- 44
0
votes
2 answers
Model-View-Presenter and Transferring Large Objects
I have traditionally implemented a Model-View-Presenter [Passive View] like so:
interface IView
{
string Title {set;}
}
class frmTextBox : Form, IView
{
...
public string Title
{
set { this.txtTitle.Text = value; }
}
...
}
class frmLabel : Form,…
user195488
0
votes
0 answers
How do you inject dependencies into Presenter (MVP) in WinForms?
I used to code in ASP.Net MVC, now I have a WinForms project. I read that MVP pattern is best for WinForms. But, I'm confused on how to inject multiple dependencies into Presenter.
For example I need to load a view called "UserLoginView". The…

Vince Tino
- 142
- 13
0
votes
0 answers
MVP Passive View approach with FLTK
I have a very basic problem, trying to use FLTK with MVP Passive View as described here. I managed to do it, but it doesn´t feel right the way I´m doing it.
I´m having a Fl_Window, containing some Widgets and a Fl_Gl_Window for OpenGL…

Oliver
- 28
- 6
0
votes
2 answers
JCheckbox only changing his state by controller
Normal JCheckbox react directly on user input and sets or unsets the tick. After this the MouseListener is called. What I want to achieve is that the state of the JCheckbox can only be changed by the controller. What are decent way to achieve…

Pascal Zaugg
- 183
- 2
- 9
0
votes
1 answer
An issue with the Passive View MVP in simple WinForms application
Imagine a simple application with a list of customers:
CustomerWindow: ICustomerView
{
private CustomerPresenter customerPresenter;
CustomerWindow()
{
this.customerPresenter = new CustomerPresenter(this);
}
}
When the user…
user1312703
0
votes
2 answers
MVP: Passive View (with EF) and layers
I'm creating an application using MVP: Passive View and EF (model first). As of know, I have a presenter getting data directly from the DataContext created through EF. It looks something like this:
private void UpdateOrderTableControl()
…

Lahey
- 429
- 1
- 6
- 16
0
votes
2 answers
Passive View - view specific logic
Let's say I want to implement Passive View design pattern. I have a view which contains a listbox (which I perhaps will swap with listview or something else in the future). Now, with Passive View one should make the view as dumb as possible. Lets…

Roger Saele
- 177
- 2
- 10
0
votes
2 answers
Using Mockito for unit-testing a presenter with a passive view
The problem
A presenter that "manages" a passive view subscribes to events that occur in that view (e.g. button click), and does not directly expose the methods that handle those events as public interface. I don't like the idea to make those…

Ivan Gerken
- 914
- 1
- 9
- 21
0
votes
1 answer
Managing errors and CSS in View through Presenter
The MVP model that I have implemented in my project is Passive MVP. The presenter has a reference to the view. Also, presenter has a Display interface which the view has to abide by.
My current Display interface is as below -
public interface…

bhootjb
- 1,501
- 1
- 21
- 33
0
votes
2 answers
How do I properly implement a model-view-presenter with passive in C# Winforms?
I'm studying design patterns right now, I'm fairly new to this model-view-presenter, although I have already experience in asp.net mvc I'm trying to do an implementation of mvp in winforms.
The string in the textbox will be sorted with an algorithm…

Randel Ramirez
- 3,671
- 20
- 49
- 63
0
votes
1 answer
How do you communicate between presenter and view in MVP scheme?
Basically there is two options as I know.
The first is view expose notifications events which a presenter should be subscribed to. When user clicks on some button on the view, view just triggers some event, notifies that something is changed.
The…

kseen
- 359
- 8
- 56
- 104
0
votes
3 answers
Model depends on two repositories. How to mock one of them?
I have a Project entity that has a set of Word entities within. My WordsRepository depends on the Project entity. It should operate over the set of words that the project includes.
public interface IWordsRepository
{
List…

kseen
- 359
- 8
- 56
- 104