exercises

8. implementation support

EXERCISE 8.6 [extra - not in book]

(a) How do old character-based systems differ from graphical systems in terms of the low-level operations through which they can be programmed?

(b) In principle a programmer could build an interface using these low-level primitives. What do window managers and toolkits offer over and above this level of programming.

answer available for tutors only

(a) Some features are obvious:

character-based input: only characters, cursor and function keys
graphical input: the above + mouse clicks at particular coordinates, continuous mouse movement

character-based output: print string or put characters at specific locations; some also allow colours, flashing characters, special box characters, etc; characters are laid out in a fixed grid
graphical output: set any pixel colour, possibly primitives for line drawing, area filling, etc. Character printing may not be primitive, but where it is it allows proportionate (non-fixed-width) fonts.

  • N.B. windowing operations such as 'show/hide window', 'redraw', etc. are not correct answers to this part, which is about the low-level primitives.
  • In addition, the programming style differs in that older character-based applications are more likely to offer a fixed dialog - input-print-input-print etc - whereas graphical ones tend to be more user driven. However, this is as much an issue of the toolkits and window managers used. Some character-based systems are very user driven and it is possible to have question-answer style windowed dialogs (as in many install programs).

(b) (see beginning of section 8.2 and 8.4 of Human-Computer Interaction)

Window managers and toolkits:

  • manage the sharing of the screen by multiple applications
  • often include more sophisticated graphics and text operations
  • isolate the application from the device-specific primitives of different hardware
  • supply common widgets such as buttons, textfields, scrollbars, etc.
  • help to obtain a consistent look and feel across different applications

Other exercises in this chapter

ex.8.1 (ans), ex.8.2 (ans), ex.8.3 (tut), ex.8.4 (tut), ex.8.5 (tut), ex.8.6 (tut), ex.8.7 (tut), ex.8.8 (tut), ex.8.9 (tut)

all exercises for this chapter