Midterm I Flashcards

(98 cards)

1
Q

What type of GUI object is the root of a containment hierarchy?

A

Container

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A GUI object can act as a listener to only one event source.

A

FALSE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Each GUI component instance can be contained only once in a containment hierarchy.

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

All events in the event queue must be processed.

A

FALSE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

GUI frameworks hide large chunks of the control flow of the program

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a graphical user interface?

A

A graphical user interface is a computer display format that allows the user to select commands, call up files, start programs, and do other routine tasks by using a mouse to point to pictorial symbols (icons) or lists of menu choices on the screen as opposed to having to type in text commands.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a semantic event?

A

everything other than low-level events. Examples of semantic events include action and item events.
A semantic event might be triggered by user input;
expresses what the user is doing, such as “clicking that button”
defined at a higher-level to encapsulate the semantics of a user interface component’s model

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Provide a definition for GUI framework

A

framework: cohesive set of interfaces and classes that collaborate to provide services for the core,
unvarying part of a logical subsystem. contains concrete (and especially) abstract classes that define interfaces to conform to., object interactions to participate in, and other invariants.
GUI framework: uses computer graphics to display individual gui components and the overall GUI

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is MVC?

A
  • a pattern used for UI development
  • creates a clear division between domain objects (model) that model the real world and presentation objects that are the GUI elements visible on the screen
  • domain objects should be completely self contained and work without reference to the presentation, they should also be able to support multiple presentations, possibly simultaneously
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what does model do?

A
  • encapsulates data specific to the application
  • responds to state queries
  • exposes application functionality by defining computation and logic to process data
  • notifies view of changes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

what does controller do?

A
  • acts as an intermediary between one or more view objects and one or more model objects
  • defines application behavior
  • maps user actions to model updates
  • selects view for response
  • one for each functionality
  • invokes state change to model
  • sends view selection to view
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

what does view do?

A
  • renders the models
  • what users can see
  • requests updates from models
  • responds to user actions by sending user gestures to controller
  • allows contoller to select view
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

HTML5 is…

A

a markup language for web pages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What does javascript do?

A
  • Read elements from documents, write new elements and text into documents, manipulate or move text
  • reacts to events (clicking a button)
  • determines the user’s screen size, date/time, etc
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the DOM?

A

document object model
- represents the web page loaded into the browser using a series of objects
- main object is the document object, which contains child objects
- specifies document interface

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is React?

A

a declarative, efficient, and flexible JavaScript library for building user interfaces

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is D3?

A

a JavaScript library for manipulating documents based on data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

GUI

A

“Graphical User Interface” is a computer display format that allows the user to select commands, call up files, start programs, and do other routine tasks by using a mouse to point to pictorial symbols (icons) or lists of menu choices on the screen as opposed to having to type in text commands

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

WIMP

A

“Windows, Icons, Menus and Pointing device”
style of user interaction with a graphical user interface that allows a user to interact with the computer through the means of a pointing device such as a mouse to select words from drop down menus or images such as icons on the display screen that represent commands for movement, activation or some other action

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

what is a gui component?

A
  • an element that displays an information arrangement changeable by the user
  • provides a single interaction point for a given kind of data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

containment hierarchy

A

tree of components that has a top-level
container as its root

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

how do components of the MVC interact?

A

the view recognizes a gui action&raquo_space; the view calls the appropriate method on the controller&raquo_space; the controller accesses the model (possibly updating it)&raquo_space; if the model is altered it notifies interested listeners of the change (view)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

what is the model-view separation principle?

A

Model (domain) objects should not have direct knowledge of view (GUI) objects, at least as view objects
- allow separate development of the model and UI layers

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

what are the types of containers?

A
  • top level: at least one of these must be present in an app
  • general-purpose: used in most applications
  • special-purpose: play specific roles in the UI
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
what are the kinds of gui components? (4)
basic controls interactive displays of highly formatted information uneditable information displays containers
26
draw and describe the main event loops
initialization >> get next event from queue >> process event >> are we done yet? (>> either get next event or clean up and exit)
27
what are events used for?
they propagate and deliver information about input devices, windows, and semantics actions to the GUI components they change property values within GUI
28
what are listener objects?
they receive and process event objects listen to a source object handle and process events with methods
29
interface
list of methods implemented by the listener and invoked by the source with the event object as a parameter
30
event object
data passed from the source to the listener
31
source
creates event objects and maintains a list of listeners
32
what are the 2 event types
low-level semantic
33
low-level events
represent window-system occurrences or low-level input mouse and key events both of which result directly from user input
34
semantic events
anything that isnt low level include action and item events express what the user is doing (clicking that button)
35
what can trigger events?
- user gestures - modification of a web page - network requests made by a web page
36
what is a design pattern?
the event system is a design pattern - named pair of problem and its solution - the pattern starts with an agreement over a kind of event and the name string used for the event, the type of the data structure used to represent the key properties of that event, and the javascript object which will emit that event
37
how are patterns implemented?
defining a java script function which takes as an argument the data structure which was agreed upon Registering the function using the name String with the object which will emit the event
38
what does the DOM event model consist of?
- the DOM event flow (describes flow of events in a tree-based structure) - set of interfaces to access contextual information on events and to register event listeners.
39
what are the goals of DOM events?
The design of an event system which allows registration of event listeners and describes event flow through a tree structure. Provide a common subset of the current event systems used in DOM Level 0 browsers.
40
how are events propagated?
when events happen to an HTML element, the element checks for event handlers, the element calls them and sends any references that are present
41
what is event capturing
starts with the outer most element of the DOM and works inwards to the HTML element the event took place on and then out again
42
what is event bubbling
it begins by checking the target of the event for any attached event handlers, then bubbles up through each respective parent element until it reaches the HTML element
43
what are the 3 phases of the DOM event flow
capture: taking the event object from default view to the target's parent target: the event object must arrive at the event object's event target bubble: propagates through the target's ancestors in reverse order.
44
what are event types
- standard events: defined in official Web specifications and should be common across browsers. - nonstandard events: not defined in official Web specifications and supported only by some browsers - browser events: never exposed to web content and can only be used in the specific browser content context - add-on-specific events - developer tool-specific events
45
what are the 3 characteristics of react?
- declarative - component based - learn once, write anywhere
46
declarative
- design simple views for each state in the application - React updates & renders the component if its data changes
47
component based
- Encapsulated components that manage their own state. - Composition of components to make complex UIs.
48
learn once, write anywhere
- No assumptions about the rest of technology stack. - Rendering on server using Node. - React Native for mobile applications.
49
what is the component lifecycle?
mounting: mount components with constructor and render (render phase), React updates DOM and refs and componentDidMount is invoked (commit phase) updating: will update states on components and rerender (render phase), React updates DOM and refs and componentDidUpdate is invoked (commit phase) unmounting: componentWillUnmount() is invoked for cleanup before a component is unmounted and destroyed
50
5 steps to mocking an interface
1. UI structure: break the UI into a component hierarchy. 2. Static version: build a static version in React (no intreactivity). 3. Minimal UI state: identify the minimal and complete representation of UI state 4. State implementation: identify where the state should live. 5. Inverse data flow: add inverse data flow.
51
what should be a component
something that should ideally only do one thing
52
what are the 2 versions of the data model?
- props (get passed to the component) - state (managed within the component)
53
how are components created?
write a javascript function or use an ES6 class component names begin with a capital letter
54
components must never modify their own props
TRUE
55
elements
smallest building blocks of React apps describes what is seen on the screen
56
React elements are immutable
TRUE, Once a React element is created, its children or attributes cannot be changed.
57
parent and child components can know if a certain component is stateful or stateless
FALSE
58
state is local or encapsulated
TRUE, It is not accessible to any component other than the one that owns and sets it
59
state management
a state “lives” in some component and that component alone can change it
60
what are the 4 UX components
usability usefulness emotional impact meaningfulness
61
what is the lifecycle of the UX process
A cycle of the life of a UX design From inception to deployment (and beyond) - Understand needs (of users) - Create design candidates - Construct prototypes - Evaluate UX
62
usability
assessed by learnability, efficiency, memorability, errors, and satisfaction can be evaluated by heuristics and above attributes
63
10 principles of usability heuristics
- visibility of system status - match between system and the real world - user control and freedom - consistency and standards - error prevention - recognition rather than recall - flexibility and efficiency of use - aesthetic and minimal design - help users recognize, diagnose, and recover from errors - help and documentation
64
accessibility
assistive technologies exist to enable people with permanent or temporary disabilities to use the computer
65
examples of accessibility
voice interfaces, screen readers, alternate input devices
66
human computer interaction
Studies the design and use of computer technology, focused on the interfaces between people (users) and computers.
67
goals of HCI
- research - Providing tools, techniques, and knowledge for system implementers - Raising the computer consciousness of the general public
68
5 human factors central to community evaluation
time to learn speed of performance rate of errors by users retention over time subjective satisfaction
69
universal usability
the ultimate goal: addressing the needs of all users anyone can use it
70
guidelines
Low-level focused advice about good practices and cautions against dangers
71
principles
Mid-level strategies or rules to analyze and compare design alternatives
72
theories
High-level widely applicable frameworks to draw on during design and evaluation, as well as to support communication and teaching
73
8 golden rules of interface design
•Strive for consistency •Cater to universal usability •Offer informative feedback •Design dialogs to yield closure •Prevent errors •Permit easy reversal of actions •Keep users in control •Reduce short-term memory load
74
properties of descriptive theories
§ Explanatory § Prescriptive § Predictive
75
properties of human capacity theories
§ Motor task § Perceptual § Cognitive
76
norman's 7 stages of action
§Forming the goal §Forming the intention §Specifying the action §Executing the action §Perceiving the system state §Interpreting the system state §Evaluating the outcome
77
gulf of execution
Mismatch between the user's intentions and the allowable actions
78
gulf of evaluation
Mismatch between the system's representation and the user’s expectations
79
hooks
special function that lets you “hook into” React features useState is a Hook that lets you add React state to function components useEffect is a Hook that can be viewed
80
mui components
work in isolation §They are self-supporting, and will only inject the styles they need to display. §They don't rely on any global style-sheets. §Styled engine
81
examples of react design patterns
§Factory: An interface for creating a singleobject, but let subclasses decide which class to instantiate. §Façade: A unified interface to a set of interfaces in a subsystem. §Iterator: Accessing the elements of an aggregate object sequentially without exposing its underlying representation. §Monitor: An object whose methods are subject to mutual exclusion.
82
antipatterns
A commonly-used pattern of action that, despite on the surface being an appropriate and effective response to a problem, has significant negative outcomes.
83
examples of antipatterns
§God Object: an object that references a large number of distinct types, has too many unrelated or uncategorized methods, or some combination of both. §Death by Planning: too much planning. §Intellectual Violence: intimidation through use of jargon or arcane technology. §Smoke and Mirrors: excessive use of demos and prototypes by salespeople.
84
layout components
primary concern is helping to arrange other components created on the page. other components shouldn't know or care where it is that they're actually being displayed on the page Split-screen Modal
85
container components
take care of all of the data loading and other data management for their child components take that logic out into the container and the container then takes care of loading that data and passes it automatically to the children components
86
uncontrolled components
keeps track of all its own internal state and really the only time the data gets out of that component is when some event occurs keeps track of its own state
87
controlled components
have their parent takes care of keeping track of the state and that state is then usually passed through to a controlled component as a prop The state of the component is passed through as props. controlled relies on data from another component
88
higher-order components
components that instead of just returning JSX, they return another component
89
custom hooks
combine basic hooks to provide extra hooks share complex behavior between several different components
90
functional languages
based on mathematical functions key idea: do everything by composing functions: §No mutable state. §No side effects.
91
MUI
material UI library of React UI components that implements Google's Material Design
92
2 phases of react component
render and commit
93
3 components of the box model
margin padding content
94
what are the lifecycle methods?
mounting: constructor getDerivedStateFromProps render componentDidMount updating: shouldComponentUpdate getSnapshotBeforeUpdate componentDidUpdate unmounting: componentWillUnmount() error handling: getDerivedStateFromError componentDidCatch
95
key idea of functional languages
do everything by composing functions so there is no mutable state or side effects
96
reference forwarding
components take a ref they receive, and pass it further down (forward it to a child)
97
infrastructure of a web gui is a combination of…
user input, html5, dom, display
98
relationship between react element and component
elements are building blocks of components