Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>Unless I want to end up with an explosion of methods (OpenFormViewingScenario1, OpenFormViewingScenario2, etc).</p> </blockquote> <p>You can not remove the <em>inherent</em> complexity of the requirements. One way or another, you will need to detect the use case and act accordingly. </p> <p>You can list all possible combinations or try to factor out the processing intelligently -- if it's possible. For instance, if due to the very nature of the requirement there are <code>N * M = X</code> possibilities, then having an exhaustive listing of <code>X</code> methods is indeed not good. You should factor so has to create the <code>X</code> possible forms from a composition of the <code>N</code> and <code>M</code> cases. </p> <p>Without knowing the exact requirement it's hard to say. Then there are many possible way to factor such a composition, e.g. <em>Decorator</em>, <em>ChainOfResponsability</em>, <em>Filter</em>, etc. These are all ways to compose complex logic.</p> <blockquote> <p>Namely, the UI, which had been living in ignorant bliss about the implementation details of OpenFormForViewing, must possess knowledge of and create an instance of IFormViewCreator.</p> </blockquote> <p>The presentation should be handed out a form created somewhere else, so as to remain agnostic from the form creation. The form will however need to be assembled/created somewhere. </p> <p>In MVC, such logic goes in the controller which would update the model/form and dispatch to the correct view/rendering. The same can be done with ASP.NET </p>
    singulars
    1. This table or related slice is empty.
    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. 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