Questions tagged [passive-view]

46 questions
0
votes
1 answer

Using MVP, how to create a view from another view, linked with the same model object

Background We use the Model-View-Presenter design pattern along with the abstract factory pattern and the "signal/slot" pattern in our application, to fullfill 2 main requirements Enhance testability (very lightweight GUI, every action can be…
Dinaiz
  • 2,123
  • 3
  • 21
  • 29
0
votes
0 answers

Trouble understanding Passive-View in MVP Winforms C#

I am trying to implement MVP (Passive View) pattern in a Winforms application. As far as I understood, in Passive View implementation of MVP, the View does not know about the Presenter. So I need to talk to it somehow! I have used events for this.…
Vahid
  • 4,369
  • 10
  • 55
  • 116
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
  • 53
  • 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,521
  • 2
  • 21
  • 40
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
1 answer

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
  • 12
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
  • 5
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
  • 162
  • 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
  • 409
  • 6
  • 14
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
  • 167
  • 2
  • 9
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
  • 896
  • 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…
Jayesh Bhoot
  • 1,347
  • 1
  • 18
  • 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,393
  • 19
  • 43
  • 60
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
  • 1,606
  • 7
  • 49
  • 98