Docsity

Lecture Slides on Interactive Programming - Interactive System Design | INFSCI 2470, Study notes of Information Technology

Partial preview of the text

Download Lecture Slides on Interactive Programming - Interactive System Design | INFSCI 2470 and more Study notes Information Technology in PDF only on Docsity!

  • http://www2.sis.pitt.edu/~peterb/2470-022/ Peter Brusilovsky Lecture 3: Interactive ProgrammingInteractive System DesignINFSCI

Introduction: Interfaces

No interface: Batch processing

Command/Dialogue Interface

Graphical User Interface (GUI)

Direct manipulation Interface

NL and Speech

Virtual reality

Gestures

Commands/Dialogue

Direct manipulation

GUI and Direct Manipulation

 interface controlsusing multiplemultiple actionsUser can perform

 effectEvery action has an



interface “echoes” itaction is performed,To show that the

 Affordance and Feedback

  • A good GUI has to hint the users which parts ofAffordance action can be takenthe interface awaits their action and what kind of
  • Appeal to common sense, everyday life, GUI standards (guidelines)



  • A good GUI need to show the users that the actionFeedback is performed.
  • Change the “picture”, change controls, provide other kind of feedback (why other?)

Event-redraw loop in GUI

Initial Presentation Produce OutputInterpret Input

Events

Redraw

 Event-Redraw in GUI

  • Events coming from GUI controlsAsynchronous events input (multiple!)



  • Events are sent to the correspondingenvironmentSupported by OS and programming components of the program
  • Programming in terms of event responses



  • elements of the”picture” and controls2-3D, not a 1D “stream” output changed separately

 Models “behind” the windows

“internal model” behind the screen (data)Each component of the interface has an



visualizes this model^ The presentation part of the interface



this model^ The widgets let the user to do actions on



the model and it has to be re-displayed^ The actions usually result in a change of

 Implementation of the model

of classes (encapsulation of data)^ Model is implemented as a class or set



Methods are provided to:

  • Present components of the model on the screen (usually private for the class)
  • Change the model parameters - this will– Query model parameters drawing actionstrigger a sequence of component re-

Example 2: Date and Time

 Internal Model

 Events

 Changing model



Drawing

The Big Picture

Code

x=3y

(^2)

GUI

RedrawModelChange Widgets

Model

Application

Widget state model

 Programming with Java

  • Java programs Consist of pieces called classes

Classes contain methods, which perform tasks



  • Class libraries Rich collection of predefined classes, which you can use

Interface)Also referred as Java API (Applications Programming



  • Two parts to learning Java classesLearning the language itself, so you can create your own

Learning how to use the existing classes in the libraries

 Java Programming Cycle

Edit

(^) Use an editor to type Java program

(^) vi

(^) or (^) emacs

, notepad, Jbuilder, Visual J++

(^) .java

(^) extension



Compile

(^) Translates program into

(^) bytecodes

understood by Java interpreter

(^) javac

(^) command:

javac

myProgram.java

(^) Creates

(^) .class

(^) file containing

(^) bytecodes



Verify

are valid and do not violate security^ Bytecode verifier makes sure bytecodes

files (viruses)^ Java must be secure - possible to damage



Execute

time^ JRE interprets program one bytecode at a

(^) Performs actions specified in program

Java Programming Cycle

 Tools to use

Old, Good Way (editor/compiler):

  • SUN’s SDK/JRE
  • Use with some editor (crimson, pfe)• Download from java.sun.com



IDE’s

  • Other free IDE’s– Free version of SUN’s Forte– Free version of Borland Jbuilder– Microsoft J++