Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
In my own code, I make use a generic notification system which allows high-level systems to register themselves with lower-level libraries to help invert dependencies. An example of this is how my game engine's UI library can register itself with the Input library, so it can receive mouse, keyboard, and gamepad events, necessary for manipulating UI controls. But the Game itself also needs to register for some UI events itself, not to mention debug functionality like ImGui for debug windows, etc. So I use this notification system to ensure the low-level Input library can push events out to multiple subscribers without needing to know about them.