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 everyday job. From what I've seen, it's probably the most popular pattern used today. What I ha...
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 notebook.js that contains class definitions for NotebookController and Notebook View.
No...
In addition to being a 30 year pattern, MVC was never meant for current applications. MVP was its successor and designed to handle event based apps coming out in the 90s. Passive View and Supervising Controller seem to have risen to the top. For those two, it almost isn't necessary to talk about MVC/MVP.
Specifically, is the controll...
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 Passive View?
...
I have some hierarchical data in a Winforms TreeView control and I need to expose it as a property so my presenter can synchronize changes to it. Just to be clear, I'm using the Passive View pattern. With most WinForm controls this is a no-brainer. The controls themselves expose their data as a system type which can easily be passed alon...
I'm working with the Passive View pattern. The user clicks a new account button. The view delegates responsibility to the presenter using parameterless method calls.
The problem is there are multiple account types so the user needs to pick which one they want to create. How do I resolve this?
Create a new form from the view, get the n...
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 UserControl which is also a View of its own MVP triad:
interface ISubView{}
class SubView:...
Hi,
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). This is
what it looks like (omitting code not relevant for this example). Basically w...
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 navigation buttons.
The user can use buttons to change the active view, but the bar is ...
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 controller create the child controller?
...
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 dependency on swing and also should "run the show", i.e. tell the view what to do and not vice ...
Hi!
In MVC and MVP and similar patterns there's often the approach of the "passive view" which is as stupid (contains as few logic) as possible. This should facilitate unit testing and create a clearer separation of view and model.
I know that those patterns come in very different flavours and especially the understanding of MVP seems ...
I'm thinking about an implementation of MVP - Passive View pattern in JavaScript. In most case the view will be simple dom elements where the presenter attaching event listeners. But when it comes to widgets like JavaScript based pseudo selectboxes, auto suggest or aria features, should this be part of a JavaScript view class or should ...
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, IView
{
...
public string Title
{
set { this.lblTitle.Text = value; }
}
...
}
class Pres...
Hey there,
I have a design question about the communication between the model and the presenter in the MVP design pattern -- or more accurately its derived form the passive view.
Let's assume the following simple GUI as an example: I have a window where my view is a list and there is the possibility to open a file dialog to select a fi...