Partially inspired by the Business Events marketplace module, I would like to see an ability to both publish and consume events natively within a single Mendix application (without requiring a separate event broker). The main goal is to enable decoupling of (marketplace) modules within an application, greatly improving reusability and extensibility for all modules.
Suggested idea:
What this would solve:
This is different from the existing Business Events marketplace module, because that module is intended to share events between apps (not within an app itself) and requires a separate event broker which also comes with a license fee when running in Mendix cloud.
Furthermore, this functionality should be a built-in feature of the platform so anyone can use it without adding another dependency on another module or broker to handle the events. I could develop a similar custom module and publish it to the marketplace, however the adaptation of such module would be limited without native/platform support..
Example usages:
Any thoughts/remarks/alternatives are appreciated! And don't forget to share with others if you like the idea..
Regards, Joost
*edit: image would not show, re-uploaded the image
@Andrej:
if BusinessEvents would provide the same functionality without depending on an event broker I would use it more often, for sure.
I would prefer it to be a built-in feature of the platform/Studio Pro to prevent introducing another dependency to a central marketplace module (but I'll take it as long as it has platform support)
In addition, the BusinessEvents module is based on sending only certain primitive values (e.g. you could send a unique identifier of the object subject to the event, or a JSON export containing more context information). This makes sense for business events between different apps as the other app is not aware of the source app's domain models, but within an app you could pass the actual Mendix object. This would also be easier to understand and implement for developers, even though it only skips one step. For example, using the primitive value the 'consumer' would first need a retrieve action to get to the source object and/or apply an import mapping if the context info is provided as a json string.
Another great idea to create decoupled architectures in general. Most likely, a user will use this together with the Task Queue as it's likely that the triggered event needs to be monitored in any way. I do believe that having Business Events for broader usage scenarios would be the best fit to keep things straightforward to Mendix developers.
Would you use Business Events for this if it didn't need an event broker or if the event broker had a free tier? Is the modelling part of Business Events a good fit with your need or do you have additional needs?
See also https://community.mendix.com/link/space/app-development/ideas/4891 for my other idea to improve reusability