Joel.Watson92@gmail.com | LinkedIn: /in/joel3rbear | Twitter: @Joel3rBear
Some examples of back end-events could be when a user gets signed into the application or when they create a new post.
Events can be better than asynchronous actions with callbacks because you are able to easily attach multiple listeners to an event to do many different things. This gets extremely complicated with callbacks as they usually must be called in the correct order.
An EventEmitter is the class imported from Nodes events module and is used to raise events and to listen for/handle raised events inside the application.
A programs callstack, event queue and event loop are active the whole time you app is running. While the initial callstack is being run through, the event loop continuously checks to see if the callstack is empty. whenever the callstack is empty it will dequeue an event from the event queue and add it to the callstack.