Event-Driven Programming + 3factor App Architecture = Modern Apps!

Before OOP languages, the programmer would control how the program is executed and that would be from the app’s main routine. In modern programming, that control is delegated to the external non-main loops, and the main routine becomes an event-loop that waits for events to occur and then executes it with the relevant event handler.

This new model of programming (it has been around since the 70s though) is called event-driven programming.

What Is Event-Driven Programming?

In event-driven programming, user actions and interactions are the triggers that initiate the next flow of events. Apps built in 2021 are generally made with the user at the center of the programmer’s thinking, and as such, are created to respond to any sort of user commands.

In this asynchronous programming model, as mentioned above, there’s usually an event-loop that looks out for new events as they come in. Once an event is initiated, an event handler is triggered at the specific time that the event is produced.

These procedures that are triggered can be either stored routines or external programs. Thus, the control of the flow of the program execution is external, largely invisible to the programmer, and there’s no discernible flow of control.

What Are 3factor Apps?

3factor app is a modern artificial pattern for building modern full-stack applications. The 3factor architecture pattern is fully aligned with the event-driven programming paradigm, and uses the following 3 “factors”:

  1. Realtime GraphQL.
  2. Reliable Eventing.
  3. Asynchronous (Async) Serverless.

#serverless #graphql #eventing #graphql api #hasura #asychronous

Modern 3factor Apps with Event-Driven Programming
1.25 GEEK