Method metrics with AOP

As of now, we only managed to monitor our system with specific moments: calls to metrics, metrics, and errors occurring. A sure way to monitor everything in our application is to use AOP (Aspect-oriented programming) within our Angular apps. AOP is not a new technique, but it isn't widely used in the JavaScript ecosystem. AOP consists of defining aspects. Aspects are subprograms that are associated with specified pieces of our application. Aspects are woven into methods at compilation time and are executed before and/or after the method they are woven into. In the case of Angular-based applications, the method will be woven at transpilation from TypeScript to JavaScript. Weaving an aspect to a method in vanilla JavaScript ...

Get Angular Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.