It is always hard to work on code that you did not originally build. It is even harder when the original developers who worked on the code are all gone, there is no documentation, and no one is exactly sure how it is implemented. Unfortunately, this is an all-too-common problem for businesses with legacy software applications. These legacy applications typically have been a driver of revenue and profits for the business for a long time, so they are vital. This means that as the business changes, these legacy applications need to be updated as well. But because of architectural drift and erosion, updating and fixing problems is hard and becoming harder all the time.
This is where software archaeology and software architectural recovery is necessary. Software archaeology is the study of poorly documented legacy software. Software architecture recovery is a set of methods used in the extraction of architectural information. Updating and maintaining a legacy software application requires that you start with software archaeology to get an understanding of the software, and how it is implemented and used. Then you can move on to software architectural recovery where you resurrect the original architecture or at least create a more modular/maintainable architecture.
Software archaeology and software architectural recovery are tedious and time-consuming when done by hand. Luckily, there are tools like Lattix and Parasoft that can reduce the time to generate data to move forward with updating and maintaining a legacy software application. Parasoft helps with the static analysis and testing while Lattix helps you understand the architecture and the software at a high level.
When you are first given a legacy software application, it is a good idea to do both software archaeology and software architectural recovery. These two processes will help you evaluate the system and estimate the impact of change. The impact of change will affect how much it will cost to maintain and update the system. Like archaeology, software archaeology is about the study of the past. The goal is to get as good of an understanding of the software and its history as you can. Once you have that understanding, you can begin the software architectural recovery process.
Here are the steps to follow for proper software archaeology:
Once you understand the history of the software and its current implementation, you can start the software architectural recovery process. The goal of software architecture recovery is to arrive at an agreement about the organization of a software application and how to update/maintain it going forward. The parts for software architectural recovery are:
Once the code is understandable and maintainable, you will need a way to prevent further erosion of the architecture. With Lattix, you can create design rules to prevent changes from causing architectural drift and erosion. With the architectural map of the elements and their dependencies and an understanding of the intended architecture, you can create your design rules. Design rules are permitted dependencies that allow you to follow the intended architecture and ensure that you do not erode the architecture as you change the code. Building the source code in a CI/DevOps pipeline with Lattix and Parasoft, you can constantly monitor the source code changes for static analysis violations, failed tests, and architectural violations. You can also monitor key metrics to make sure that the overall health of the system is maintained.
Software archaeology and software architectural recovery are very valuable when given a legacy application to maintain. These processes will give you a head start in tackling the complex problem of updating and fixing a legacy application. While it is possible to do this all by hand, this can be very time-consuming, especially for large legacy applications. Tools like Lattix and Parasoft can help.