I’m still having trouble seeing the benefit, but I’m guessing it somehow allows a kind of decoupling that makes it easier to build and maintain complex apps.
I’m reminded of this related idea: Publish-Subscribe Messaging - #3 by hugetim Aside from the UI stuff, I suspect your idea could likewise be built as a custom Anvil add-on.
Just to brainstorm on one piece, I’m imagining a single server function called server_event
, say, which would call other functions defined in a server module, partly to reduce the number of server round-trips:
@anvil.server.callable
def server_event(event):
...
@events.fire_on_events(['panic'])
def send_sms(panic_message, customer):
...
@events.fire_on_events(['panic'])
def send_email(panic_message, customer):
...