add the __invoke methods for app and space to implement hook callbacks