Added `pre` method to application class

Signed-off-by: Artem Smirnov <art543484@ya.ru>