Quickly learn how new to you code works

Introduction

AppMap helps developers to ensure that they’re going down the right path, and that they’re aware of all the web services, SQL, dependency services, libraries, and security functions, and how they interact with application code.

AppMap helps you to understand exactly what code does - and the larger the code base, the better it works. Instead of trying to read all the code, you use interactive diagrams to search and navigate the code base, inspecting just the code that’s relevant to your task. The source code is just a click away, so you can move smoothly back and forth between high-level code design views, code execution traces, and source code details.

How it works

AppMap is a recorded execution trace containing information about how the entire application stack actually works when the application code is run. This data is tremendously helpful for understanding an unfamiliar code base, because it provides a big picture of all code components with their interdependencies, as well as code flow details that enable efficient step-by-step investigation into how it works.

Without AppMap, a typical new-to-you-code onboarding process can take days or weeks for large applications. However, a walkthrough of an AppMap takes minutes, quickly revealing the software design and structure together with all internal and external packages, web service endpoints, database operations, and data flow details. AppMap diagrams provide convenient shortcuts to source files, as drilling down to source code is a critical part of the learning experience.

Install and configure the AppMap agent for your language
AppMap agent records executing code as JSON files
The AppMap extension for your code editor displays AppMap data as interactive diagrams

Fig.1 How it works

Step-by-step

1. Setup and installation

First, you’ll need to set up and install AppMap for your code editor and setup the AppMap agent, as described in the Getting started guide.

2. Record AppMaps

Once you have AppMap installed and working in your code editor, it’s time to record some AppMaps. The best way to create AppMaps is to run test cases, as described in the guide for your code editor.

When you’re working in unfamiliar code, you may not even know which test cases are relevant to your work. That’s OK! Ask your co-workers or mentor for some suggestions. Once you’ve located the test cases that are relevant to your work, run them with AppMap enabled.

3. Open and use AppMaps

Now it’s time to view and interact with AppMap diagrams. Basic usage of the diagrams is described in How to use AppMap diagrams.

4. Tips and tricks

Depending on what kind of issue you’re trying to solve, you can employ different strategies with AppMaps.

Top-down approach

The top-down strategy is recommended when discovering how an unfamiliar code base works. Start with the big picture - the Dependency map - and drill down into individual components and their interdependencies from there.

  1. Start with the Dependency map, and observe all major components of the application and how they are interrelated.
  2. Inspect Web services and their parameters
  3. Drill downS to classes and functions that implement their handling
  4. See how code sections interact and how data flows
  5. Observe dynamic dependencies between internal and external components
  6. Observe how internal and external components interact with SQL Database.
Bottom-up approach

Instead of starting with the big picture, you can directly focus on an area of interest - such as a specific SQL command, code label, or function call - and work your way up to code that is responsible for its invocation.

  1. Start with a functional area of interest, e.g., a specific SQL command, function call, or code label
  2. Find the code object by searching in the navigation bar
  3. Open it in the Trace view, see how it is interconnected with downstream and upstream events, and navigate to its caller to see where it is used
  4. Observe the surrounding code in the Trace and dependencies in the Dependency Map.

Was this page helpful? thumb_up Yes thumb_down No
Thank you for your feedback!