Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In general you need to use a Factory Pattern for these types of situations. Your mix of ScreenService, ScreenRepository, and Screeninfo sounds like you nailed it. <a href="http://en.wikipedia.org/wiki/Factory_pattern" rel="nofollow noreferrer">Here</a> is a basic overview of what a Factory Pattern. You can use the Wikipedia article as a starting point to see if there are any variation or aspects that you missed.</p> <p>I designed and maintain a CAD/CAM application that has several libraries of precanned parametric shapes where the user can type in a few dimensions and calculate the shape for cutting. Each shape has it's own screen setup. I use a similar pattern to your during the startup of my applications. </p> <p>I scan the directory of shape library for each assembly, pick out the factory class which has a method that retrieves a list of shapes, load it into a master list. When the user clicks on a toolbar button or picks from the list the software then uses a key to pull the right shape out of the list which exposes a IShapeScreen interface. The form that manages the shapes uses that interface to draw the correct entry screen for that shape. </p> <p>This method has worked for nearly a decade without any significant problems and just as important hasn't left me with a "Oh I wish I did this when I designed it" feeling. So I think you are on the right track.</p> <p>Note that you may not need to use a text based config file. Using attributes, some interfaces you define and the .NET reflection API you can just throw DLLs in a directory the software can scan that directory and correctly pull in the desired objects. In your case screen objects. However if you want a human to edit the configuration then a text based file is certainly called for. I am assuming that you are using the .NET API as you tagged with .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