Framework-agnostic implementation of the Command Pattern