You probably know that AI tools like Copilot and CodeWhisperer are quite good at writing applications. That’s great if you’re developing a new app from scratch.
But what if you have an existing app – one you may have developed years ago, long before AI-assisted coding was a thing – that you’d like to modernize. Can AI help you there, too?
The answer is a resounding “yes.” Although much of the conversation surrounding the use of AI in application development focuses on generating code for new apps or features, AI can be just as valuable as a way to accelerate various steps of the application modernization process.
What is application modernization?
Application modernization means updating an existing application in ways that help it run more efficiently or securely. It often includes moving an app to the cloud, where it can take advantage of cloud services that enhance its scalability while also reducing the burden placed on the IT team to manage the app.
Similarly, application modernization may entail migrating a monolithic app to a more flexible type of application architecture, such as microservices.
AI and app modernization: A step-by-step guide
Historically, the work required to modernize applications was mostly manual. Developers had to sit down and decide how to modernize their apps by hand. Then, they manually implemented all of the code changes necessary to achieve the modernization goals they had set. Overhauling their application monitoring and infrastructure management practices to fit a modern, cloud-based environment was a manual affair, too.
But thanks to the current generation of AI tools, much of this work can be automated. To understand how, let’s discuss the role that AI can play in each of the four key stages of the app modernization process: Discovery and assessment, code refactoring, application monitoring and infrastructure management.
1. Application discovery and assessment
The first step in application modernization is to take stock of existing applications, decide which ones to modernize and assess how much effort it will take to modernize them.
These processes don’t include writing code, but they’re nonetheless areas where AI tools like CAST Highlight can help by automatically evaluating your organization’s application portfolio and identifying apps that are cloud-ready. They can also examine application architectures and design patterns to determine how well each application aligns with modern principles, such as the twelve-factor design. They can even suggest applications that are too dated to be candidates for modernization, and that should instead be retired or rewritten from scratch.
2. Code refactoring and modernization
The refactoring of code – which means restructuring and, often, partly rewriting existing code to make applications fit a new design or architecture – is the most crucial part of the application modernization process. It has also tended in the past to be the most laborious because it required developers to pore over often very large codebases, painstakingly tweaking code function-by-function or even line-by-line.
AI, however, can do much of this dirty work for you. Instead of having to find places where code should be rewritten or modified in order to optimize it, developers can leverage AI tools to look for code that requires attention. AI can also detect “dead” code that is no longer actively used and should be removed from the codebase. It can explain in natural language what code does – which is a big help when developers are trying to figure out the purpose of arcane code that, in some cases, was written many years ago by someone who is long gone from the company. And it can generate tests that you can use to validate your code during the refactoring process, helping to ensure that code changes don’t break the application.
AI can also, of course, generate much of the new code that developers need to produce during refactoring. But that’s just part of what makes AI tools, like Cursor and GitHub Copilot, so valuable during application modernization. AI is much more than just a code generation solution; it’s a virtual assistant that removes much of the tedium and busy work from the refactoring process.
3. Continuous testing and monitoring
After modernizing your application itself, you’ll likely also find that you need to modernize the way you test and monitor the application. After you’ve refactored the app and moved it to a new, cloud-based environment, your old testing and monitoring practices will probably not suffice.
AI can help here, too, in multiple ways. Perhaps most important, AI can modify application code to instrument observability so that the applications are compatible with OpenTelemetry, the universal standard for collecting monitoring and observability data. Once instrumentation is complete, organizations can use any OpenTelemetry-compatible monitoring and observability platform to collect and analyze application logs, metrics and traces.
AI can also write the code necessary to run automated tests, helping to assess application functionality and performance quickly and efficiently. It can parse monitoring data in real time to identify issues that require attention and trace errors to their root cause – ultimately resulting in a lower Mean Time to Repair (MTTR), which is what every development and IT operations team strives for.
Personally, I’m a fan of Dynatrace for its AI-powered monitoring features (as well as its full support for OpenTelemetry), but a growing number of monitoring and observability platforms now offer similar capabilities.
4. Supercharging infrastructure management
When you move applications to the cloud, the infrastructure that hosts them is effectively a software resource – which means you can configure and manage it using code.
By extension, you can use AI tools like Cursor and Copilot to write and test your code-based infrastructure configurations. Specifically, AI is capable of tasks such as writing and maintaining the code that manages CI/CD pipelines or cloud servers. It can also suggest opportunities to optimize existing infrastructure code to improve reliability or security. And it can generate the ancillary configurations, such as Identity and Access Management (IAM) policies, that govern and help to secure cloud infrastructure.
The ability to manage infrastructure code using AI tools supercharges productivity. I estimate that the efficiency of my own DevOps teams has roughly doubled since we began using AI to write, enhance and debug infrastructure automation code.
AI and the future of application modernization
It’s important to note that AI can’t fully manage all aspects of application modernization entirely on its own. You’ll always (or for the foreseeable future, at least) need a human in the loop to validate recommendations or code generated by AI tools, and to perform the complex assessments – such as understanding user priorities and factoring them into modernization plans – that AI isn’t well suited to handle.
But with help from AI, teams can dramatically speed the modernization process and reduce much of the toil traditionally associated with it. By extension, they can move more of their applications to modern, cloud-centric environments and architectures – and, in the process, create more value for the business and a more delightful experience for end-users.
About the Author
Derek Ashmore is Application Transformation Principal at Asperitas. 𝐀𝐬𝐩𝐞𝐫𝐢𝐭𝐚𝐬 𝐂𝐨𝐧𝐬𝐮𝐥𝐭𝐢𝐧𝐠 empowers organizations to fully realize the benefits of cloud computing through our holistic, end-to-end approach. Whether you’re a mid-market innovator or a global enterprise, our multidisciplinary expertise streamlines every phase of cloud adoption—maximizing ROI, reducing complexity, and accelerating time to value. Our track record spans complex, high-impact solutions for some of the world’s largest industry leaders, and our team of sought-after specialists covers the entire technology spectrum. With Asperitas Consulting, you gain a 𝐭𝐫𝐮𝐬𝐭𝐞𝐝 𝐩𝐚𝐫𝐭𝐧𝐞𝐫 for successfully implementing a truly 𝐂𝐥𝐨𝐮𝐝-𝐄𝐧𝐚𝐛𝐥𝐞𝐝 𝐄𝐧𝐭𝐞𝐫𝐩𝐫𝐢𝐬𝐞.