32
Human-Computer Interaction and Java Graphical User Interface Building Aleksandar Kartelj [email protected] University of Belgrade, Faculty of Mathematics

Human-Computer Interaction and Java

Embed Size (px)

DESCRIPTION

University of Belgrade, Faculty of Mathematics. Human-Computer Interaction and Java. Graphical User Interface Building Aleksandar Kartelj [email protected]. Outline. Introduction Functional models for GUI, UML… GUI Design (Java) Implementation details Clients and technologies - PowerPoint PPT Presentation

Citation preview

Page 1: Human-Computer Interaction  and Java

Human-Computer Interaction and Java

Graphical User Interface Building

Aleksandar Kartelj [email protected]

University of Belgrade, Faculty of Mathematics

Page 2: Human-Computer Interaction  and Java

Outline• Introduction• Functional models for GUI, UML…• GUI Design (Java)• Implementation details• Clients and technologies• Concluding remarks

Page 3: Human-Computer Interaction  and Java

Resources• Kraemer, Elieen, A Java-based Course in Human-Computer

Interaction, PDPTA, 2000.• Lazar, Johathan, Jinjuan Heidi Feng, and Harry Hochheiser,

Research Methods in Human-Computer Interaction, Wiley.com, 2010.

• Marinilli, Mauro et al., Professional Java User Interfaces, New York: John Wiley & Sons, Inc., 2006.

• Weaver, James et al., Pro JavaFX 2: A Definitive Guide to Rich Clients with Java Technology, Apress, 2012.

• Programming Paradigms Course, Faculty of Mathematics, University of Belgrade.

Page 4: Human-Computer Interaction  and Java

Introduction• 1980s shifts in visual technology:

• raster graphics,• specialized graphic memories, processors• I/O devices

• But, GUI design issues remained:• User happiness• Effectiveness• Complexity• …

Page 5: Human-Computer Interaction  and Java

Design perspective• User-centric vs development-centric design • Focusing on human details is critical:

• Perception• Memory• Learning capabilities

• Central issues:• User• Task

Page 6: Human-Computer Interaction  and Java

FUNCTIONAL MODELS

Page 7: Human-Computer Interaction  and Java

Standard abstract UI model

Page 8: Human-Computer Interaction  and Java

Layers

Page 9: Human-Computer Interaction  and Java

Team

Page 10: Human-Computer Interaction  and Java

Early design phase• UML use case diagrams• Typical (happy path) scenario analysis

Page 11: Human-Computer Interaction  and Java

Lifecycle approaches• Rational Unified Process (RUP)• User experience (UX) storyboards:

enriching use cases with GUI design info• Extreme programming and agile approaches• Evolutionary prototyping

Page 12: Human-Computer Interaction  and Java

GRAPHICAL USER INTERFACE DESIGN

Page 13: Human-Computer Interaction  and Java

Skipping theoretical parts• Short term memory and cognitive modelling• System response time and user• Compromising between human control and automation• Presenting the user with internal state of application

Page 14: Human-Computer Interaction  and Java

User-centered design

Single rule:“Know the user.”

Page 15: Human-Computer Interaction  and Java

GUI example

Page 16: Human-Computer Interaction  and Java

Component costs

Page 17: Human-Computer Interaction  and Java

Design guidelines

Page 18: Human-Computer Interaction  and Java

Iterative development• Prototyping• Refactoring• User interface testing• Software testing• Usability testing• Profiling

Page 19: Human-Computer Interaction  and Java

Prototyping

Page 20: Human-Computer Interaction  and Java

IMPLEMENTATION DETAILSDesign patterns inside Java GUI

Page 21: Human-Computer Interaction  and Java

Java GUI underlying patterns

Page 22: Human-Computer Interaction  and Java

Separating Presentation• Elements that need to be separated:

• Look and Feel (how the components are drawn)• Some interaction styles (one or two clicks)• Fonts• Color and themes

• Provided by Swing by pluggable look and feel• SWT and AWT enforce certain modularization• JavaFX uses separate FXML source files

Page 23: Human-Computer Interaction  and Java

Data Transfer Object (Data I/O)• Holds business data in transactions between service providers

and clients• Single method to send and receive DTO

• Decreases bandwidth• Simplifies communication

• Usually contains only necessary information

Page 24: Human-Computer Interaction  and Java

Observer Pattern (Control)• Event-based communication• Publish and subscribe mechanism

Page 25: Human-Computer Interaction  and Java

CLIENTS AND TECHNOLOGIESForm-based, web-based, mobile clients

Page 26: Human-Computer Interaction  and Java

Form-based rich clients (1)• Microsoft technologies (Window Forms), Flash (Flex), Java

based,…• Java differences:

• Full object-oriented approach• Multi-platform execution• Highly collaborative community• JRE• SWT sacrifices a part of portability for performances

Page 27: Human-Computer Interaction  and Java

Form-based rich clients (2)• Usual strategy:

• Content first• Data second (simulate moving back and forth)

• Plain Old Java Object (POJO) object

• Commands third• AWT• Swing• SWT• JavaFX

Page 28: Human-Computer Interaction  and Java

Web-based clients (1)• Web environment

• Client display size, connection types, different browsers• No state• Cannot operate when disconnected from server• Attention to bandwidth and interaction issues• Web pages are defined in non-object-oriented languages• No installation needed

Page 29: Human-Computer Interaction  and Java

Web-based clients (2)• Typical business implementations:

• Servlets• JSP• JSF (Spring, Struts,…)

• Example of online game scenario:• Data: Postgresql + JPA (Hibernate)• Logic: Tomee+ Rest Services• Presentation: JavaScript + AJAX + JQuery

Page 30: Human-Computer Interaction  and Java

Mobile based clients• J2ME MIDlets• Limitations:

• Low hardware resources• Simplified application lifecycle

• Cost-driven design• Other problems…

Page 31: Human-Computer Interaction  and Java

Concluding remarks• HCI – design, implementation and evaluation of interactive systems for

humans• GUI building is its practical part: design, software architecture, code

tactics• Java has good GUI related stuffs:

• Widely used and well documented• Architecture-neutral, available• High level GUI packages• Growing importance on the internet

Page 32: Human-Computer Interaction  and Java

THANK YOU FOR ATTENTION.

[email protected]@gmail.com

www.math.rs/~kartelj