In some methods yo split Boundary, Control and Entity objects.
And use special icons for them:
[ icons.gif ]
(Graphic showing common icons and stereotypes).
The code that describes user interfaces is independent of the code
for the logic of an enterprise or application. The appearance of
the user interface for a pay-roll should be separated from the
rules for calculating your with-holdings.
Neither should the choice of the user interface framework change
the calculations. So the wise designer splits all the
user interface code into specialized classes that communicate
with the application specific classes. This is splitting
the users "View" from the logical "Model".
As a result the "Model" classes can reflect the Domain or Business
model and so are easier to understand and get right... and keep right.
As a result you can change the View (add a new one, rip out the AWT and
put in Swing, ...) without worrying about the payroll logic.
Here is a paper
[ 1121341.1121453 ]
that has a set of Java programs that access a time server and show the
user the time of day found on that server. One program has a command line
interface, one has a menu driven ASCII interface and one a GUI interface,
but they share a common "model" of how to access the time server. This
class never changes... each interface is implemented as a new class that
uses the model:
The diagrams in the paper are not correct UML, do not use them!
In general, there are lots of classes defining the user interface and
many classes in the Model. In the UML use packages to contain them.
More strictly the user interface code is split into two sets of classes.
The View and the Controler. Typically the user communicates with controlers
that change the model. The view classes get data from the model
and are responsible for rendering it to the user.
User ---> Controler ----> Model -----> View -----> User