Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I had great success with this <a href="http://www.martinfowler.com/eaaDev/PassiveScreen.html" rel="nofollow noreferrer">Passive Screen</a> pattern.</p> <p>In my opinion, the big problem of the traditional MVC architecture is that people stuff way too much into the form classes. This increases the amount of manual testing you have to do.</p> <p>The more automated testing you can do after you compile, the more bugs you will catch at your desk. In a complex application, the side effects from even minor changes occur all too often.</p> <p>The trick to solving this is making a controller assembly that the form assembly (or EXE) references. Every form has a corresponding class in the assembly. Clicking a button will call <code>ThisForm.ThisButton(&lt;args&gt;)</code> which will then fire objects lower in your framework. Each form implements an interface so that, if the controller class needs additional information from the form, it has a interface to retrieve it.</p> <p>Then for your <a href="http://en.wikipedia.org/wiki/Unit_testing" rel="nofollow noreferrer">unit testing</a> you simulate an operator performing complex operations by implementing dummy classes to fire events and feed information to the controller classes. The controller classes don't know any different as the dummy classes implement all the expected interfaces.</p> <p>There is an important exception and that is for trivial dialogs. For dialogs that have a few check boxes I feel this organization is overkill. I use the <a href="http://en.wikipedia.org/wiki/Command_Pattern" rel="nofollow noreferrer">command pattern</a> a lot. So in the assembly where I define the Command objects, I put the SIMPLE dialog associated with that command. How simple a dialog has to be to get this treatment is up to you.</p> <p>I like to structure my applications as follows.</p> <ul> <li><p>Utility - This is an assembly that has stuff I use all the time - Math functions, file function, etc.</p></li> <li><p>Objects - This has the specific objects I am using for this application.</p></li> <li><p>UIFramework - This defines all form and controller interfaces.</p></li> <li><p>Commands - This has all the Command objects that manipulate my application objects. </p></li> <li><p>UI - Objects that implement the controller interfaces</p></li> <li><p>EXE - Forms that implement the form interface and calls the controller objects.</p></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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