CS260. UI Toolkits. Björn Hartmann University of California, Berkeley EECS, Computer Science Division Fall 2010

Similar documents
Software Tools. Scott Klemmer Autumn 2009

UI Toolkits. HCID 520 User Interface Software & Technology

UI Toolkits. HCID 520 User Interface Software & Technology

Software Tools. Scott Klemmer. stanford hci group / cs147. tas: Marcello Bastea-Forte, Joel Brandt, Neil Patel, Leslie Wu, Mike Cammarano

Berkeley. CS160: User Interface Design. Video Puppetry: SIGGRAPH Asia Widgets, Events, MVC 02/29/12 2/29/12

Event Driven UIs and Model-View-Controller

UI Toolkits. HCID 520 User Interface Software & Technology

Fall UI Design and Implementation 1

Organization of User Interface Software

Event Dispatch. Interactor Tree Lightweight vs. Heavyweight Positional Dispatch Focus Dispatch. 2.4 Event Dispatch 1

User Interface Toolkits

Event Dispatch. Interactor Tree Lightweight vs. Heavyweight Positional Dispatch Focus Dispatch. Event Architecture. A pipeline: Event Capture

Event Dispatch. Dispatching events to windows and widgets.

UI Software Organization

Windows and Events. created originally by Brian Bailey

Graphical User Interfaces (GUIs)

Human-Computer Interaction. Chapter 2. What is HCI?

CS 4300 Computer Graphics

stanford hci group / cs376 UI Software Tools Scott Klemmer 14 October research topics in human-computer interaction

User Interaction. User Interaction. Input devices. Input devices. Input devices GUIs and GUI design Event-driven programming 3D interaction

MOBILE COMPUTING 1/20/18. How many of you. CSE 40814/60814 Spring have implemented a command-line user interface?

Page 1. Human-computer interaction. Lecture 2: Design & Implementation. Building user interfaces. Users and limitations

We will talk about Alt-Tab from the usability perspective. Think about: - Is it learnable? - Is it efficient? - What about errors and safety?

(Incomplete) History of GUIs

Graphical User Interface (GUI)

User Interface Design

Low fidelity: omits details High fidelity: more like finished product. Breadth: % of features covered. Depth: degree of functionality

8/30/15 MOBILE COMPUTING. CSE 40814/60814 Fall How many of you. have implemented a command-line user interface?

CMSC434. Introduction to Human-Computer Interaction. Week 10 Lecture 16 Mar 29, 2016 Engineering Interfaces II. Jon

Graphical User Interface (GUI)

NADAR SARASWATHI COLLEGE OF ENGINEERING & TECHNOLOGY

Review. Designing Interactive Systems II. Review. Base Window System. Apps UITK BWS GEL. 4-Layer Model Graphics and Event Library BWS GEL

Seng310 Lecture 8. Prototyping

Widget Toolkits CS MVC

Widgets. Widgets Widget Toolkits. 2.3 Widgets 1

Prototyping. Readings: Dix et al: Chapter 5.8 Marc Rettig: Prototyping for tiny fingers, Communications of the ACM, April 1994.

Widgets. Widgets Widget Toolkits. User Interface Widget

CS6008-HUMAN COMPUTER INTERACTION Question Bank

Page 1. Human-computer interaction. Lecture 1b: Design & Implementation. Building user interfaces. Mental & implementation models

utablesdk: Enabling Rapid Prototyping of Window-based Applications on Interactive Tabletop

CSE 510: Advanced Topics in HCI

Chapter 6: Interfaces and interactions

Interaction Style Categories. COSC 3461 User Interfaces. What is a Command-line Interface? Command-line Interfaces

Widget. Widget is a generic name for parts of an interface that have their own behaviour. e.g., buttons, progress bars, sliders, drop-down

What is interaction? communication user system. communication between the user and the system

Lecture 6. Design (3) CENG 412-Human Factors in Engineering May

Input: Interaction Techniques

Framework. Set of cooperating classes/interfaces. Example: Swing package is framework for problem domain of GUI programming

CS 116x Winter 2015 Craig S. Kaplan. Module 03 Graphical User Interfaces. Topics

GUI Implementation Support

Java Swing Introduction

Designing Interactive Systems II

Tcl/Tk lecture. What is the Wish Interpreter? CIS 410/510 User Interface Programming

The 60-Minute Guide to Development Tools for IBM Lotus Domino, IBM WebSphere Portal, and IBM Workplace Applications

Our Hall of Fame or Shame candidate for today is the command ribbon, which was introduced in Microsoft Office The ribbon is a radically

Objectives. Object-Oriented Analysis and Design with the Unified Process 2

Lecture 9: UI Software Architecture. Fall UI Design and Implementation 1

Introduction to GUIs. Principles of Software Construction: Objects, Design, and Concurrency. Jonathan Aldrich and Charlie Garrod Fall 2014

C SCI The X Window System Stewart Weiss

Human-Computer Interaction IS4300

Chapter 2: Operating-System Structures

Automatic layout Constraints Model-based UI. Declarative programming. Procedural programming. Saying what you want. Saying how to achieve it

CS123. Programming Your Personal Robot. Part 2: Event Driven Behavior

Human-Computer Interaction Design Studio

Designing RIA Accessibility: A Yahoo UI (YUI) Menu Case Study

Operating-System Structures

Original GUIs. IntroGUI 1

chapter 3 the interaction

Heavyweight with platform-specific widgets. AWT applications were limited to commonfunctionality that existed on all platforms.

GUI in C++ PV264 Advanced Programming in C++ Nikola Beneš Jan Mrázek Vladimír Štill. Faculty of Informatics, Masaryk University.

Merits of QT for developing Imaging Applications UI

IconStickers: Converting Computer Icons into Real Paper Icons

COMP6700/2140 GUI and Event Driven Programming

Input (part 2: input models)

GUI Program Organization. Sequential vs. Event-driven Programming. Sequential Programming. Outline

Chapter 5. Software Tools

TYPES OF INTERACTORS Prasun Dewan Department of Computer Science University of North Carolina at Chapel Hill

Page 1. Ideas to windows. Lecture 7: Prototyping & Evaluation. Levels of prototyping. Progressive refinement

Model-view-controller View hierarchy Observer

Designing accessible applications

Chapter 6: Interfaces and interactions

Event-based Programming

Universal Communication Component on Symbian Series60 Platform

ArtOfTest Inc. Automation Design Canvas 2.0 Beta Quick-Start Guide

Human Computer Interaction Lecture 08 [ Implementation Support ] Implementation support

Cut, Paste, Drag-and-Drop. Benefits, data formats, and Java implementation

Beyond CSE143. What s Left To Do? Templates. Using Templates. A Template Class. A Problem with Reusing Code CSE 143

Fall UI Design and Implementation 1

SYSPRO s Fluid Interface Design

The MUI (Micro User Interface) facility

Input part 3: Interaction Techniques

Chapter 2. Operating-System Structures

C# Forms and Events. Evolution of GUIs. Macintosh VT Datavetenskap, Karlstads universitet 1

POAD Book: Chapter 4: Design Patterns as Components Chapter 5: Visual Design Models

CS415 Human Computer Interaction

GUI Basics and Windowing Systems

SBD:Interaction Design

Lecture 8: Rapid Prototyping. CS 338: Graphical User Interfaces. Dario Salvucci, Drexel University.

Event-driven Programming: GUIs

implementation support

Transcription:

CS260 UI Toolkits Björn Hartmann University of California, Berkeley EECS, Computer Science Division Fall 2010

In the beginning cryptonomicon.com/beginning.html

The Xerox Alto (1973)

Event-Driven UIs Old model (e.g., UNIX shell, DOS) Interaction controlled by system, user queried for input when needed by system Event-Driven Interfaces (e.g., GUIs) Interaction controlled by user System waits for user actions and then reacts More complicated programming and architecture

Console program pseudo-code Do some work Prompt user for input Wait for user input Process user input Do some more work Exit

Console program // Java Example: Console console = System.console(); String name = console.readline( Your name: ); System.out.println("You have entered : " + name);

Minimal interactive program Do until a quit command: { " wait for user input " process it " (optionally) update display }

Minimal interactive program Do until a quit command: { " wait for user input " switch (input-cmd) {!! case insert: do-insert( )!! case delete: do-delete( )!! case backspace: " (optionally) update display }

Minimal interactive program Can t use this (global) approach for window systems, because the result of a user command depends on the active window (and the active component within that window). Too many possible combinations of input x target window.

Widgets Encapsulation and organization of interactive controls Class hierarchy encapsulating widgets Top-level Component class Implements basic bounds management, and event processing Drawn using underlying 2D graphics library Input event processing and handling Typically mouse and keyboard events Bounds management (damage/redraw) Only redraw areas in need of updating

W. Newman Light Handle 1967/68 11

Interface Builder - Library

Toolkit Example: Java Swing GUI toolkit with a widget set and an API 7

Declarative Layout (WPF) <StackPanel> <Label>Enter Text:</Label> <TextBox TextWrapping="Wrap > </TextBox> <StackPanel Orientation="Horizontal" HorizontalAlignment="Right"> <Button>Ok</Button> <Button>Cancel</Button> </StackPanel> </StackPanel>

User Interface Builders 8

Event Dispatch Apple, Cocoa Event-Handling Guide

Event Dispatch Loop Event Queue Queue of input events Mouse moved (t 0,x,y) Event Loop (runs in dedicated thread) Remove next event from queue Determine event type Find proper component(s) Invoke callbacks on components Repeat, or wait until event arrives Component Invoked callback method Update application state Request repaint, if needed

Cocoa Event Dispatch Loop 1) Events from input devices enter here 3) Main loop processes one event per iteration 2) Event is added to FIFO event queue Apple, Cocoa Event-Handling Guide

Event Dispatch: Targeting Label TextArea Buttons

Event Dispatch Window Panel Event Queue Mouse moved (t 0,x,y) Mouse pressed (t 1,x,y,1) Mouse dragged (t 2,x,y,1) Key typed (t 3, F1 ) (queues and dispatches incoming events in a dedicated thread) Label TextArea Panel /* callback for TextArea */ public void mousemoved(e) { // process mouse moved event } Button Button

Mouse/Touch vs. Keyboard Events Mouse Events are (usually) routed to the top-most (in z- order) visible component underneath the cursor using hit testing. Exception: captured mouse events after beginning interaction Keyboard events are (usually) routed to the component that has key focus. Exceptions: keys that change focus, accelerator keys

Success of Tools Window Managers, User Interface Toolkits, and Interface Builders are ubiquitous Most software built using them Are based on many years of HCI research: Brad A. Myers. A Brief History of Human Computer Interaction Technology. ACM interactions. Vol. 5, no. 2, March, 1998. pp. 44-54. 11

Why Tools? The quality of the interfaces will be higher. Why? Rapid prototyping. Easier to incorporate changes motivated by evaluation. Re-use affords investment in high quality tools. Consistency of interface design. Enable collaboration among specialists. 12

Why Tools? The UI will be easier to create and maintain. Why? Less code to write due to component re-use. Better modularization, separation of concerns Tools may abstract complex systems or algorithms. Easier to port an application to different hardware or software environments if device dependencies are isolated in the user interface tool. 13

What should tools do? Help design the interface given a specification of the tasks. Help implement the interface given a design. Help evaluate the interface after it is designed. Create easy-to-use interfaces. Allow the designer to rapidly investigate different designs. Allow non-programmers to create user interfaces. Provide portability across different machines and devices. Be easy to use themselves. 14

Tools might do: Provide sets of standard UI components Guide the implementation Help with screen layout and graphic design. Validate user inputs Handle user errors Handle aborting and undoing of operations Provide help and prompts Deal with field scrolling and editing Insulate the application from all device dependencies Allow the end user to customize the interface. 15

Application Types What application domains are deserving of specialized toolkit support? 16

Application Types Word processors Drawing programs (CAD/CAM) Painting programs Mail readers Spreadsheets Programming environments / code editors WWW browsers Interactive games Visualizations Automated-teller machines (ATM) Virtual Reality Multi-media Video Animation Controlling machinery 17

DiamondSpin Toolkit Toolkit for tabletop UIs (Shen, Vernier, Forlines, Ringel, CHI 04) 18

19

Tabletop UI Needs Multi-user support Identity-aware widgets Multiple menus Public and personal spaces Resolving conflicting actions Arbitrary orientation of UI elements Techniques to control orientation and layout Rotation sensitive components 20

istuff Toolkit Physical UI components for ubiquitous computing environments (multiple users, devices, and applications) [Ballagas, Ringel, Stone, Borchers], CHI 03 21

istuff Design istuff components Device + proxy ( smarts are in the proxy) PatchPanel Translate between istuff events and applicationspecific events Run-time retargetable events Address dimension mismatches 22

23

Discussion of Themes Address the useful & important aspects of UIs Narrower tools have been more successful than ones that try to do everything Do one thing well Threshold / Ceiling Research systems often aim for high ceiling Successful systems often seem to instead aim for a low threshold Impossible to have both? 24

Threshold & Ceiling Programming in C Visual Basic Director (v6) Difficulty of Use MFC Click and Create C Programming Lingo xcmds HyperCard C Programming HyperTalk Basic Goal Sophistication of what can be created 25

Discussion of Themes, cont. Path of Least Resistance Tools should guide implementers into better user interfaces Goal for the future: do this more? Predictability Programmers do not seem willing to release control Especially when system may do sub-optimal things Moving Targets Long stability of Macintosh Desktop paradigm has enabled maturing of tools 26

Evaluating User Interface Tools An API is a user interface where programmers are the users Should you evaluate toolkit as you would a UI? Factors Expressiveness (Ceiling) Development Rate (of skilled user) Learning Rate (to become skilled) Performance Portability 27

Class Deployment (In collaboration with Leapfrog)

41

42

43

44

The Future of Interface Tools Supporting Prototyping Collaboration Evaluation of interfaces built with tools of tools themselves how to prototype, test, iterate? Emerging interface styles, such as mobile recognition-based UIs (speech, pens, vision) multiple devices 28

Summary Toolkits provide reusable interface components to simplify UI development Toolkit trap: it s tempting to only make UIs that the toolkit makes easy, instead of making what s best for a specific app Toolkit types: WIMP (Garnet, Swing, Motif, etc) Specialty (Phidgets, istuff, Papier-Mache, DiamondSpin, GroupKit, Peripheral Displays Toolkit, etc) 30

Toolkit features may not matter... Arduino: no smart components programmed in C Wildly successful with amateurs & artists. Why? 48