26 replaced http://stackoverflow.com/ with https://stackoverflow.com/
source | link

For code that interacts directly with the user - responding to keypresses and clicks - event-driven programming (or a variation thereof, such as functional reactive programmingfunctional reactive programming) is almost unavoidable. You, the programmer, have no idea when or where the user is going to click, so it's down to the GUI framework or browser to detect the user's action in its event loop and notify your code. This type of infrastructure is also used in networking applications (cf NodeJS).

For code that interacts directly with the user - responding to keypresses and clicks - event-driven programming (or a variation thereof, such as functional reactive programming) is almost unavoidable. You, the programmer, have no idea when or where the user is going to click, so it's down to the GUI framework or browser to detect the user's action in its event loop and notify your code. This type of infrastructure is also used in networking applications (cf NodeJS).

For code that interacts directly with the user - responding to keypresses and clicks - event-driven programming (or a variation thereof, such as functional reactive programming) is almost unavoidable. You, the programmer, have no idea when or where the user is going to click, so it's down to the GUI framework or browser to detect the user's action in its event loop and notify your code. This type of infrastructure is also used in networking applications (cf NodeJS).

25 added 54 characters in body
source | link

This is certainly slower than a regular function call, which only involves pushing a new frame on the stack. However, the flexibility that an event-driven architecture affords you makes it much easier to isolate and optimise slow code. Having the ability to submit work to an asynchronous processor is a big win here, as it allows you to serve a request immediately while the hard work is dealt with in the background. In any case, if you're interacting with the DB or drawing stuff on the screen then the costs of IO will totally swamp the costs of processing a message. It's a case of avoiding premature optimisation.

This is certainly slower than a regular function call. However, the flexibility that an event-driven architecture affords you makes it much easier to isolate and optimise slow code. Having the ability to submit work to an asynchronous processor is a big win here, as it allows you to serve a request immediately while the hard work is dealt with in the background. In any case, if you're interacting with the DB or drawing stuff on the screen then the costs of IO will totally swamp the costs of processing a message. It's a case of avoiding premature optimisation.

This is certainly slower than a regular function call, which only involves pushing a new frame on the stack. However, the flexibility that an event-driven architecture affords you makes it much easier to isolate and optimise slow code. Having the ability to submit work to an asynchronous processor is a big win here, as it allows you to serve a request immediately while the hard work is dealt with in the background. In any case, if you're interacting with the DB or drawing stuff on the screen then the costs of IO will totally swamp the costs of processing a message. It's a case of avoiding premature optimisation.

24 deleted 90 characters in body
source | link

An event is a notification describing an occurrence from the recent past, which other code needs to be notified about. The term event is also used to mean the message describing an event.

An event is an occurrence from the recent past, which other code needs to be notified about. The term event is also used to mean the message describing an event.

An event is a notification describing an occurrence from the recent past.

23 improve wording
source | link
22 added 98 characters in body
source | link
21 edited body
source | link
20 deleted 2 characters in body
source | link
19 added 43 characters in body
source | link
18 added 28 characters in body
source | link
17 added 154 characters in body
source | link
16 edited body
source | link
15 deleted 70 characters in body
source | link
14 added 3 characters in body
source | link
13 added 4 characters in body
source | link
12 added 4 characters in body
source | link
11 added 9 characters in body
source | link
10 added 86 characters in body
source | link
9 added 86 characters in body
source | link
8 added para about performance
source | link
7 added para about performance
source | link
6 deleted 6 characters in body
source | link
5 added 459 characters in body
source | link
4 added 452 characters in body
source | link
3 added 29 characters in body
source | link
2 deleted 5 characters in body
source | link