cs349 - s10 - Lecture 12
CS349 -
Implementing User Interfaces - Spring 2010
Public Service Annoucements
- Assignment 2
Lecture 12 - Formalizing User Interfaces
UI Components
Completeness
Types of components
- Containers
- hold other components, including other containers
- containers form a tree with non-containers at the leaves
- usually have a layout policy
- Selectors
- choose one of many
- selection aspect
- `now' aspect
- Changers
- change a value
- value aspect
- persistence aspect
- Canvases
- hold uneditable (usually) pictures and text
- Text editors
- enter & edit text
- shows very clearly the importance of reuse
- and the difficulty of innovation
- "include the previous interface" has all sorts of problems
- (Exercise for the reader. List six problems. Yes, `all sorts'
is really right. Think concretely.)
Anatomy of a file chooser
- container
- text editor
- selector
- buttons
Anatomy of a button
- container
- selector
- canvas
Formalizing User Interfaces
What is Formalization?
- Abstraction
- Isomorphism
- Metalanguage
- required
- for defining the elements of the formal language
Examine two types of formalism
- State machine
- Production system
The State-Machine Formalism
Definition
- Set of states
- Set of actions
- Set of side effects
- This is the most important aspect because it's what affects the
user
- Can change side effect to action by widening the universe of the
abstraction
- Can change action to side effect by narrowing the universe of the
abstraction.
- Choosing the `best' universe is an art, not a science.
- Could `the universe of the abstraction' be `the universe less the
user'?
Example: the Simple Button
First try -- Press-release
- States: outside, unarmed, armed
- Side effects:
- Actions
- mouseEnter: outside -> unarmed
- mouseExit:
- unarmed -> outside
- armed -> outside
- press: unarmed ->armed
- release: armed -> unarmed & actionEvent
Second try -- Exit after press
- States: {outside, inside} X {unarmed, armed}
- Side effects:
- Actions
- mouseEnter: outside -> inside
- mouseExit: inside -> outside
- press: unarmed & inside ->armed & inside
- release: armed & inside -> unarmed & inside &
actionEvent
Return to: