Event Driven Programming

My reading notes for Code Fellows


Event Driven Programming

What native Node.js module allows us to get started with Event Driven Programming? Node.js natively provides a module called EventEmitter that allows one to get started incorporating Event-Driven Programming in a project right away.

What is the value of Object Oriented Programming used in tandem with Event Driven Programming?

One can use event listeners to trigger anything that would want to listen for that event before perfroming an operation.

Consider your knowledge of Event Driven Programming in the Web Browser, now explain to a non-technical friend how Event Driven Programming might be useful on the backend using Node.js.

Web application, like uber or facebook, have to be always on. These applications may have a multitude of components, some of which will want to perfrom a task when certain conditions are met. Rather than programming a chain of conversations between the components of an application, enevt driven programming allows an event to happen that signals to any compoment that is waiting for that event to do something. It’s the difference between telling each individual runner in a race to start running, and firing a starting pistol to tell them all at once to start running.Its much more effective, efficient, and easier to maintain over time.