app framework for online/offline handling