Cooca patterns and tools for single-page web applications