Enable Loosely-Coupled Interactions in Custom Apps
With loosely-coupled app interactions, publisher and subscriber apps:
Can be created at different times by different users.
Typically do
not know the topic names or payloads for other apps involved in any interaction.
Can be used in many different workspaces and many different interactions. In many cases, they can also be used without any other apps or interactions.
Can be custom or basic apps. Both custom and basic apps can be involved in an interaction as publisher or subscriber or both.
Users choose which apps to combine and wire together in a workspace using
Mashboard.
Wiring maps the mismatched topic names and payloads to allow the interaction work.
Custom apps that support loosely-coupled interactions must use the publish(topic,msg) or receive(topic,msg) API methods. See the MashZone NextGenApp API for detailed information on this API.
They must also declare the topics and payloads that the app publishes or subscribes to in their App Specification. For more information and samples of the tasks involved, see:
This topic builds two sample custom apps named Loosely Coupled Publisher and Loosely Coupled Subscriber. It also uses a basic app created using a sample web service, Xignite Historical Quotes, that is shipped with MashZone NextGen.
Complete samples for the HTML, CSS and App Specifications are provided in the sections describing these sample apps. For complete samples of the JavaScript classes for these two custom apps, see the
The Completed Sample Apps section.
Note: For links to other app examples, click
More... above.