Instrumenting an Angular Single Page Application (SPA)
A single page web application, as the name suggests, is a web application that fits itself on to a single web page with the goal of providing its users an experience similar to that of desktop applications.
Because of these characteristics, SPAs lend themselves to the following benefits:
- Provides the user better experience- The web pages are extremely fast and responsive.
Allows users to work offline- Even if the user loses internet connectivity, he/she can still continue working because all the pages are already loaded in a SPA.
Angular JS is a full featured SPA framework,with the help of which single page applications can be created. In AngularJS, routing is what allows you to create Single Page Applications. Routes in AngularJS are used to route the user to a different view of an application. This routing is done on the same HTML page so that the user has the experience that he has not left the page.
The first step to monitoring the performance of an Angular SPA is to RUM-enable it. This involves the following broad tasks:
- RUM-enabling the base page, AJAX, and iFrames in the SPA
- RUM-enabling the virtual pages in the SPA