Anyone have practices to share to model product variants?
For example, say you have 2 software components that are built with different localization settings and for different Operating Systems, this can be seen as two components:
- componentA, and
- componentB
Variation Point 1 is localization with variations:
Variation Point 2 is operating system with variants:
For each component, there are four variants. Example:
Component A, English, Windows 10
Component A, English, OSX 10
Component A, Japanese, Windows 10
Component A, Japanese, OSX 10
I expect the modeling concerns are common:
How do I model the variation points?
How do I parameterize (not sure if this is the appropriate term) the component configurations?
How do I view the resultant variant types.
If I understand correctly, I think I've had to deal with something similar.
We have an application that has to support English, French and German, and runs on both Windows and Linux (we actually use java, but for this example assume that the code is OS specific).
I use UML in the following way:
- If the code is identical, and the only change is the configuration it's initialized with I use components and instances
- If the code is NOT identical, I model using different components, if I want to show that these components are of the same "type", I create a generic component of that type, and use the
generalize relationship
Example: I want to model a presenter component
I have a UML Component Element representing the Presenter (1), with an attribute for specifying the language config file.
I have another UML Component Element in the Windows Package representing the Presenter (2), where (2) is generalized by (1), so (2) inherits language attribute from (1)
I have another UML Component Element in the Linux Package representing the Presenter (3), where (3) is generalized by (1), so (3) inherits language attribute from (1)
Now I can create OS specific, or OS agnostic run-time diagrams.
If I don't care about the OS I create an instance of (1), and set the run-time value of the language config to French, English, or German.
If I do care about the OS, I create an instance of (2) or (3)
I have some scripts that I created using the Sparx API to help keep the diagram layouts in sync, e.g.
place and size all instances of the same element in the same way (select correct diagram, then select target diagram)
place and size all specialized elements of the same generalized element in the same way