WebFund 2014W Lecture 18: Difference between revisions
Line 12: | Line 12: | ||
* type of event-driven programming | * type of event-driven programming | ||
** event dispatcher is implicit | ** event dispatcher is implicit | ||
** implicit "assembly line" | |||
** raw data comes in, dispatcher has routine(s) that match raw data | |||
** routine process it, leaves processed data | |||
** processed data matches other routines | |||
* normal events are incoming I/O events | |||
** keypresses, mouse clicks, network traffic | |||
* node makes use of synthetic events | |||
** generated by other code |
Revision as of 17:39, 19 March 2014
invoke versus call
- SAME THING
Reactor pattern
- direct contrast to a procedural pattern
- procedural: everything is synchronous
- each line completes before the next executes
- reactor pattern: mostly synchronous
- exception: event handlers
- dispatcher calls event handlers
- type of event-driven programming
- event dispatcher is implicit
- implicit "assembly line"
- raw data comes in, dispatcher has routine(s) that match raw data
- routine process it, leaves processed data
- processed data matches other routines
- normal events are incoming I/O events
- keypresses, mouse clicks, network traffic
- node makes use of synthetic events
- generated by other code