|
Its clear that the above
alternative does not represent a complete solution. There are
no Event arrows shown. Clearly, a strong visual
differentiation between inheritance links and Event arrows
would be required. As you can see I have chosen to tag an
inheritance arrowhead with the start state indicator to show
that the default sub-state. It is not clear how the action on
the default sub-state might be represented.
This diagram is intended as a
discussion point. Although busy looking, it would represent a
notation which is more easily manipulated in a tool and in
some respects communicates better the elements of the User
Interface. The containment hierarchy can be confusing. Try
explaining to a client business analyst why the "Button
Up" state is "inside" the "Button"
state. It can be tricky.
Stereotypes
The earlier version of Together/J
2.x allowed the addition of <<stereotype>> tags
into the Statechart. I think this was probably a bug and it
has been corrected in the latest edition which is much truer
to the UML specification. However, the <<stereotype>>
tag was in fact incredibly useful for User Interface design. I
had introduced a number of <<stereotype>> tags to
indicate the nature of the state and what it represented e.g.
<<Screen>>, <<Window>>, <<Frame>>,
<<Label>>, <<Button>>. This was a
considerable aid to communicating what the diagram represented
and easily cross referencing it with a Paper Prototype, a
Navigation Diagram and actual code.I found that graphic
designers, coders, testers and clients could all read the
Statechart diagrams and follow what it represented. This
relied on a sensible naming convention for the states and the
use of the Stereotype tags. With the latest version of
Together/J this will no longer be possible.
Better Tools may be the other
alternative
Changing the notation may be an
answer to making flat Statechart Diagrams work better.
However, changing any notation is always hard. So many people
have already learned the existing notation. The barrier for a
new notation is always high. Consider how many of you
initially resisted a move to UML? I know that I was
comfortable with Booch and Coad notations. Learning UML was a
matter of necessity.
If the notation is not to change
then we must look at better tools. One way that the current
notation could be made to work, would be to make the Diagrams
3-dimensional. Allow the drill down into a state and link
Statechart Diagrams 3-dimensionally. This way any diagram
could remain a manageable size while the full complexity could
be expressed in the model.
UML and User Interface Design
Notation
This article only hints at the
bigger picture. The real problem is that UML has never
seriously been intended for User Interface Analysis and
Design. I believe that the industry genuinely wants to tighten
up the procedures and methodologies for development of User
Interfaces and Presentation Layers. It is obvious that this
should be done within the framework of the UML. Statecharts
are only one part of what is required. A Statechart is useful
as an Implementation Level diagram. We also need to develop
conventions for Requirements, Analsysis and
Navigation/Interaction Design.
With a coherent set of notations
for each aspect of User Interface design within UML it would
then be possible to provide cross referencing between them.
To show the relationship of a state in the Statechart to an
entity on a Navigation Diagram, to a Class in the Presentation
Layer Class Diagram, to the messaging in a Sequence Diagram
and so on.
At that point, we are finally
making progress.

Thanks to Ian Horrocks for his
comments and the observation that 3D diagrams may be a better
way to go.
The Class and Statechart Diagrams
for this paper were produced using Together/J from
Togethersoft
|