In the vast realm of software development, each programmer possesses a distinct programming style. Some styles stand out as unique creations, while others represent a harmonious blend of existing approaches or serve as replicas of established norms. Among these diverse styles, one that stands apart is the MDR Programming style, a unique concept built upon the foundational principles of Event-Based programming in JavaScript.

Conceived by the visionary programmer BlueLatios on April 26th, 2024, this programming style embraces a simple yet powerful motto: “Monitor, Dispatch, Response.” Its goal is to create a modular event-driven system that exhibits exceptional scalability and ease of use that readily takes advantage of JavaScript’s many features. It heavily leans on JavaScript’s event-based API, such as the browser level CustomAPI or the NodeJS EventEmitter.

The underlying philosophy of Event-Based programming is to decouple the event handling logic from the core application code. This approach offers numerous benefits. First, it promotes modularity, as different parts of the system can be easily isolated and maintained. Second, it enhances scalability, as event handling can be distributed across multiple servers or processes. Third, it simplifies debugging, as errors can be traced back to specific events. And finally, it’s very well suited for asynchronous operations, due to JavaScript’s event-driven nature.

Programmers who embrace this style start with a solid modular base that constantly monitors for changes in the system. Once a change is detected, the system dispatches an appropriate event. This event is then handled by a corresponding response, which takes necessary actions to address the change.


The MDR Programming style can be modeled as a hub-like system consisting of three interconnected hubs, each with its own distinct purpose and separate components. These components work together in a specific order to achieve the overall goals of the programming style.

Initiation Gateway

The Initiation Gateway serves as the initial start / gateway to the event-driven system. Its primary role is to help initiate the system and any other relevant processes that may be required.
Components of Initiation Gateway:
Initialization Unit:
Responsible for initialising the event-driven system and setting up any necessary configurations or initial state.
Startup Coordinator:
Coordinates the startup process of the system, ensuring that all required components are initialised in the correct order.
Dependency Injector:
Manages the injection of dependencies into various components of the system, ensuring that they have access to the resources they need.
Configuration Manager:
Handles system-wide configurations, including settings for different environments and modules.
Bootstrapper:
Facilitates the bootstrapping process by preparing the system for execution and launching the necessary processes.

Dispatch Hub

The Dispatch Hub serves as the central monitoring and analysis center of the system. Its primary role is to monitor and analyze system and user actions, as well as environmental changes. Based on its analysis, the Dispatch Hub emits certain events to trigger subsequent actions.

Components of Dispatch Hub:
Observation Department:
Senses and observes actions or changes within the system or external inputs.
Analysis Department:
Processes and interprets observed data to decide on event emission based on predefined criteria or rules.
Emitter Department:
The central core of MDR Programming style. Emits specific events based on results from the Analysis Department.
Control Center

The Control Center receives emitted events from the Dispatch Hub and is responsible for verifying their authenticity and processing them for response execution.

Components of Control Center:
Reception Unit:
Receive events and move to the Verification Unit. 
Verification Unit:
Checks the validity and security of incoming events.x
Decomposition Unit:
Break event data into actionable formats or instructions.
Bridge Unit:
Send Decomposition Unit data to Response Facility.
Response Facility:

The Response Hub is the final hub in the MDR Programming style. Its role is to execute actions in response to processed events, potentially altering the system state or triggering additional events.

Components of Response Facility:
Execution Wing:
Acts on instructions from the Control Center, performing necessary system updates or responses.
Feedback Wing:
Optionally informs other components about the outcomes of actions for adaptive behavior or record-keeping.


Do you understand this documentation