cs349 - s10 - Lecture 25
CS349 - Implementing User Interfaces - Spring 2010
Public Service Annoucements
- Assignment 3.
Lecture 25 - Scripted Interfaces
Here's a very common type of problem.
An application has evolved in the following way
- Started out life as a big Fortran code compluting fluid dynamics in the
1960s.
- computed overnight
- users looked at numbers on fan-fold paper.
- Incorporated static computer graphics in the 1980s.
- Animated the computer graphics in the 1990s.
- and the animation came closer and closer to `real-time'. Define
carefully what this means.
Now the owners want a `graphical user interface'. (They actually ask for
`something like Windows'.)
- This is actually the most common type of user interface project.
How is it done?
UI Architectures We've Seen
Xlib-style
- interface and application mixed together everywhere
- roll everything yourself
- have lots of control, perhaps too much control
Java-style
- interface and application different classes within a single program
- interface constructed from components
- components infinitely plastic (malleable)
And a Third One We've not yet Seen
Scripting style
- to make a cheap and dirty interface quickly
- interface and application are separate programs
- interface constructed from components
We'll make such an interface out of Python.
This interface also includes a new interaction style, direct manipulation.
What is direct manipulation?
This is what we call direct manipulation.
- A subtle point. We can directly manipulate the interface, and we can
directly manipulate the application. These use the same programming
constructs, but are conceptually different.
You did direct manipulation in assignment 1,
- calculating all the geometry yourself, based on high school
geometry,
Doing this on a large scale is not practical,
- we need systematically to develop a model of geometry that we can map
onto the interface.
Scripting Languages
You've used (heard of) quite a few of them
The idea is that they allow you to combine separate, existing programs
into something useful quickly. For example,
In this course we will use Python. Why?
- It's the latest, greatest thing, an object-oriented scripting
language.
- It has a collection of classes that do all teh usual UI construction
stuff.
- (You haven't seen it in SE courses.)
Direct Manipulation Interfaces
How they work
- Grab something with the mouse
- Move around the mouse to torment it a little
- Drop it when you like the result
The very simplest direct manipulation interface
- Locations on the screen have special functionality associated with them
- usually indicated by little drawings, called icons
- e.g. wastebasket.
- Move something
- usually indicated by a little drawing
to the special location.
- The special functionality is applied it it
Such interfaces are usually best when there are lots of special
locations.
- Programs that manipulate geometry are the obvious candidates.
- Every location is special, meaning `put me here.'
In fact, geometry manipulation programs often want different
interpretations for a single location
- `Select what's here.'
- `Move whatever's selected to here.'
- `Make here the centre of rotation.'
- and so on.
Modes are used to create separate contexts that disambiguate the
meanings.
Return to: