Note that there are some explanatory texts on larger screens.

plurals
  1. POC# WinForms Model-View-Presenter (Passive View)
    text
    copied!<p>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. </p> <p>See the general GUI look at the following link:</p> <p><a href="http://img227.imageshack.us/img227/1084/program0.jpg" rel="noreferrer">GUI http://img227.imageshack.us/img227/1084/program0.jpg</a></p> <p>Now, I have done a lot of the work already, but in the very bad Autonomous design pattern. I did not know the project would ever reach a certain size, and, as such, it is time to do some major refactoring.</p> <p>I have been studying a great deal about GUI design patterns, and the pattern I am wishing to implement is the Passive View (see <a href="http://img227.imageshack.us/img227/1084/program0.jpg" rel="noreferrer">http://martinfowler.com/eaaDev/PassiveScreen.html</a>). I am looking for some help on how to bring this all together.</p> <p>Background:</p> <p>1) Depending on what the user clicks in the "TreeView", the "List" in the bottom left-hand corner will display a list of objects that can populate the "Editor" area. These objects might be a TextBox or a DataGridView. The user toggles the List to choose what he/she wants to see in the "Editor"</p> <p>2) The model is essentially a folder with data and configuration files. There is an external program that runs on a given directory, creates output files/folders, etc. This program I am developing is designed to effectively manage/configure these objects in a user-friendly way</p> <p>3) The problem with the way I have been doing things is that it is next to impossible to test, and hence the move to the MVP-esque Passive View design pattern</p> <p>I am trying to make it so that the program works independently of the View. I have not been able to find any examples where a more complex, interactive view is used with the Passive View pattern. </p> <p>Questions:</p> <p>1) Do I need to implement one large interface/view for the entire "look" of the program, then implement sub-interfaces/sub-views for each of the TreeView, Editor, Logger, etc.? Or is there a better "structure" to doing this?</p> <p>2) When it comes to "handing off" events from the View to the Presenter/Controller (whatever terminology you wish to use W.R.T. the Passive View design pattern), what is the way I should be doing this? Sometimes I have simple properties that need to be updated, and sometimes I need a whole series of steps to unfold.</p> <p>I would love suggestions and advice on this topic. I have scoured the Internet, and I haven't found adequate examples to help me continue with this project.</p> <p>Thanks in advance!</p> <p>Daniel</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload