collapse app.socket and app.view into one namespace to avoid circular dependency