Functions, events, triggers oh my! How to build event-driven app