Declarative event handling and binding