Outsystems Built-in Publisher/Subscriber (Pub/Sub) Functionality
73
Views
1
Comments
New
Frontend (App Interfaces)

OutSystems is powerful, but some of its best features are hidden from developers. This forces us to create complex workarounds for standard patterns like Publisher/Subscriber (Pub/Sub). Pub/Sub is essential for modern apps, allowing different parts to communicate without being directly connected.

While debugging the application in client side, it has been discovered that OutSystems already has a built-in Publisher/Subscriber functionality. This feature is powerful and works perfectly, as demonstrated in this 

Working demo - PubSubDemo

This internal API can be accessed with a simple piece of JavaScript:

require(['OutSystems/ClientRuntime/modules/PubSub/Publisher'], function (Publisher) { 

   window.Pubsub = new Publisher.default("DemoApp");

});

   

By adding this as a required script to a module, we can unlock a native Pub/Sub instance, allowing different blocks and components on a screen to communicate with each other without being directly coupled. This is a game-changer for building complex, modular, and responsive user interfaces. The existence of popular Forge components like "PubSubEvents" clearly demonstrates the community's need for this exact functionality.


My idea is simple: Elevate this hidden Publisher/Subscriber functionality into an official, documented, and fully supported feature of the OutSystems platform.

Demo.oml
Changed the category to
Frontend (App Interfaces)