Chapter 1: Fundamentals Flashcards

1
Q

What distinguishes applications with a GUI from applications without a GUI?

A

App without GUI is an app with a sequence of instructions that is executed and then the program stops.

App with GUI is an app where the execution of various parts of the code depends on events generated by the user with different steps which can occur in any order.

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

What kind of events can be generated by a user?

A

Events generated by user:
- touchpad
- keystroke
- mouse clicks
- input via sensors
- voice commands

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

What is a Thread?

A

Threads are used to execute code in parallel. An app with a GUI has a main thread dedicated to the UI and has parallel worker threads that take care of time-consuming tasks, so that the UI remains responsive.

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

What is the difference between a Thread and a Process?

A

Processes have their own separated memory space, while threads share the same memory space. A particular object can be accessed in multiple threads.

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

What does an event source do?

A

Event source informs the registered listeners each time an event occurs.

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

How do event sources and listeners interact?

A

Interested objects register as listeners to an event source.

Event source informs the registered listeners each time an event occurs.

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

What is the role of a listener?

A

Listener is an object that keeps receiving and reacts to information about an event and when the event occurs at the source object (click, key press, actions…).

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

What are typical tasks of the main UI loop?

A

Paints windows, handles events (e.g mouse clicks) and call methods, if necessary, execute scheduled custom code.

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

Which operations do not belong in the main UI loop?

A

Time consuming tasks like file download and lengthy computation.

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

What is the MVC model?

A

Model-View-Controller paradigm is used to separate the data from its representation and from the actions that are triggered by the user.

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