My problem:
We're designing a Windows app that uses UI controls with specific behavior in multiple UI forms. Most of the behavior is the same, regardless of where the control is used, but there are some exceptions to this rule. This means I need to be able to specify both "standard" behavior as well as "special" behavior.
Example: "State Text Box"
Standard requirements:
- Max length is 5 characters
- Forces characters to uppercase as they're entered
Special requirements:
- On this form, the State text box is disabled if the user has not yet entered the company name
Here are my ideas for possible solutions:
1. Either specify the "standard" requirements with the UI classes themselves, then add instances of the controls to a custom diagram that shows the mock-up of the UI.
- Benefit: Since my problem fits nicely into a class/object paradigm, this solution would accomplish my goal well.
- Drawback: I'm coupling the requirements to the implementation model. Theoretically, the UI mode shouldn't "know" about the implementation model.
2. Create special "UI requirements" classes, and do the same thing above.
- Benefit: I keep the UI requirements decoupled from the implementation design
- Drawback: Whenever I use the combo box to select a type for an attribute or method return type, I'll see all of my "requirements" classes
3. Create a completely separate model for the UI requirements, and use the method outlined in #2 above.
- Benefit: I won't have my type lists being cluttered by strange types
- Drawback: Now I need to manage two separate models, and flip between them to look at different types of information.
You know, the best solution would be if I had the ability, on a per-package basis to select an option that says, "Don't show classes in this package in type list." This would solve my problem.
Does anyone out there have any other ideas? What do you think is the best solution?
Thanks!
Dave