O'Reilly logo

Learning Single-page Web Application Development by Fernando Monteiro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Event-driven development and the event loop

Event-driven development came from event-driven programming, in other words, outside the paradigm of object-oriented programming, event-based programming is the ability to treat the application flow after an event is fired.

JavaScript is a great language for event-driven programming; it allows anonymous functions and closures, and more importantly, the syntax is very familiar with other programming languages. The callback functions that are called when an event occurs can be written in the same place where you capture the event. Therefore, it is easy to code and easy to maintain your application.

Almost everything in Node uses callbacks. Node callbacks are functions that will be implemented in the asynchronous ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required