Microframework for dispatching events