Questions tagged [passive-view]

46 questions
34
votes
10 answers

What Alternatives Are There to Model-View-Controller?

While going through university and from following the development of SO, I've heard a lot about the Model-View-Controller architectural design pattern. I inadvertently used the MVC pattern even before I knew what it was, and still use it in my…
Aaron
  • 22,132
  • 10
  • 45
  • 48
20
votes
2 answers

C# WinForms Model-View-Presenter (Passive View)

I'm developing a WinForms application in C#. I have limited experience in GUI programming, and I am having to learn a great deal on the fly. That being said, here's what I am building. See the general GUI look at the following link: GUI…
Daniel McClelland
  • 357
  • 1
  • 4
  • 13
16
votes
6 answers

What is the right way to wire together 2 javascript objects?

I'm currently facing a conundrum: What is the right way to wire together 2 javascript objects? Imagine an application like a text editor with several different files. I have some HTML page that represents the view for the notebook. I have a file…
Jonathan Hess
  • 209
  • 2
  • 6
7
votes
2 answers

How to Structure a C# WinForms Model-View-Presenter (Passive View) Program?

I am designing a GUI that has the following basic idea (similarly modeled after Visual Studio's basic look-and-feel): File navigation Control selector (for selecting what to display in the Editor component) Editor Logger (errors, warnings,…
Daniel McClelland
  • 357
  • 1
  • 4
  • 13
7
votes
3 answers

Model View Presenter and Composite Views

I'm trying to follow the MVP (specifically Passive-View) pattern in a java swing ui application. The basic design of the application reminds a wizard control. The screen is divided to two main parts: an active view. a static navigation bar, with…
Asaf David
  • 3,333
  • 3
  • 24
  • 33
6
votes
2 answers

What is a good way to implement events in Passive View?

I am learning the Passive View pattern to keep my C# WinForms application easier to test and maintain. It has worked well so far but I wonder if there is a better way to implement Events than the way I am doing it now (and keeping them testable).…
devghost
  • 500
  • 7
  • 12
5
votes
1 answer

Humble View/MVP with WinForms and a collection of UserControls

I'm refactoring a WinForms (.NET 4) application that makes use of a TabControl to contain a UserControl--the UserControl is instantiated in each TabPage with the end result being editors in each tab. These are editing a collection of items that…
Melissa Avery-Weir
  • 1,309
  • 2
  • 15
  • 44
5
votes
2 answers

Implementation differences between MVP Passive View and Supervising Controller for collections

I've started to wrap my head around the whole MVP pattern and despite I'm doing fine with single objects it starts getting difficult when it comes to collections. So let's say we're architecting a simple WinForms application that consists of a…
Nano Taboada
  • 4,008
  • 11
  • 57
  • 87
5
votes
2 answers

MVP Passive View - Composite Views & Composite Presenters

I found M. Fowler article on Passive View pattern. I would like to apply it in my application. I use Swing for UI. I spent several hours searching tutorials or examples how to implement it but not much useful found. Could anybody help to understand…
bancer
  • 7,040
  • 7
  • 35
  • 57
4
votes
4 answers

Swing, Passive View and Long running tasks

I'm trying to implement a Passive View based gui system in swing. Basically i want to keep my view implementation (the part that actually contains swing code) minimal, and do most of the work in my Presenter class. the Presenter should have no…
Asaf David
  • 3,333
  • 3
  • 24
  • 33
4
votes
1 answer

Creating child views in the Passive View pattern

I am very interested in using the Passive View pattern to improve testability, but I am not sure how to call child dialogs. Do you have the parent view create the child view and return an interface to the parent controller, then have the parent…
Ralph
  • 29,142
  • 31
  • 124
  • 261
4
votes
1 answer

How to Form.ShowDialog() using MVP and Passive Views?

Summary I'm experimenting with the MVP pattern in a Windows Forms application. I'd like to make both my Presenters and Views platform agnostic, so if I wish to port my application to another platform, say the Web or mobile, I simply need to…
Will Marcouiller
  • 22,531
  • 19
  • 89
  • 142
4
votes
1 answer

How do I attach a UserControl to a form in an MVP pattern?

I'm trying to create a kind of master/detail UI using an MVP pattern. I have the usual suspects: interface IMainView{} class MainView: Form, IMainView{} interface IMainPresenter{} class MainPresenter{} // Numerous domain objects I also have a…
Kenneth Cochran
  • 11,576
  • 3
  • 46
  • 110
4
votes
2 answers

Example of Passive View design pattern using JSP and POJOs

Im trying to understand how the Passive View design pattern works for simple web apps. Can someone provide a simple example of this pattern using these requirements: View is a JSP that prints HELLO WORLD! Data is persisted in the data store as…
empire29
  • 3,273
  • 6
  • 38
  • 64
3
votes
3 answers

Does Passive View breaks the Law of Demeter?

I'm trying to understand how to use Passive View correctly. It seems to me that every examples I look at on Passive View breaks the Law of Demeter : //In the presenter code myview.mytextfield.text = "whatever"; So what's a better implementation of…
subb
  • 1,518
  • 1
  • 15
  • 27
1
2 3 4