Krzysztof Kąkol
Lead Solutions Architect | Modernization & GenAI
Revolutionizing Application
Modernization with AI
xebia.com
Krzysztof Kąkol
Lead Solutions Architect in Xebia
AWS Community Builder & AWS Ambassador
https://www.linkedin.com/in/krzysztofkakol/
Other stuff:
Classical and jazz pianist
PhD in AI-driven sound processing
Presentation overview
3
The Challenge of Legacy Systems
How GenAI Transforms Code Modernization
GenAI-enhanced modernization on AWS
Real-life scenario
Sample use cases
4
The Challenge of Legacy Systems
75% of enterprise code is still in legacy languages (COBOL, Fortran,
VB6, etc.)
42% of time wasted managing technical debt
Avg. technical debt cost: $361,000 per 100,000 lines of code
5
The Challenge of Legacy Systems
Business Drivers
• Lack of skilled developers
• Cost of maintenance
• Performance & scalability issues
• Security & compliance risks
• Technical debt accumulation
How GenAI Transforms Code
Modernization
6
• Automates code analysis
• Extracts non-existing documentation
• Reduces manual effort and error rates
• Removes “curse of the blank page”
• Reduces team frustration – allows to focus on
interesting things
Key Benefits & Challenges
7
• Code comprehension at scale
• Semantic translation (not just syntax)
• Documentation recovery
• SME knowledge extraction
• Safer & faster modernization pipelines
Key Benefits
• Hallucinations & verification challenges
• Regulatory & safety concerns
• Human-in-the-loop still critical
Challenges
GenAI-supported Modernization
8
• Code inventory + analysis
• LLM-powered transformation
• Human review + validation
• Continuous test-driven verification
• Deploy incrementally
The new modernization workflow
Code Modernization
with GenerativeAI
9
10
Where GenAI helps
GenAI speeds up initial investigation – it may
detect technology, frameworks used, technical
dependencies, and many more.
Therefore, the process of modernization can be
started quickly without spending hours on initial
code and tech stack analysis.
Initial Investigation
Detecting technical debt is one of the most
challenging parts in the modernization process.
Many various factors must be taken into
consideration (eg. security), and initial analysis
might be difficult.
GenAI can be used to provide information about
detected technical debt in minutes. This can be
used to speed up further code and architecture
analysis.
Detecting Technical Debt
Most of the legacy software has little to no
documentation. It is crucial to understand the
purpose of modernized modules or programs.
Such documentation can be automatically created,
with a required level of detail – from an executive
summary to a detailed description of certain
classes or parts of code.
Preparing Documentation
11
Where GenAI helps
Efficient modernization planning is a huge
challenge. Multiple ideas must be evaluated
against business requirements and expected
outcomes.
GenAI may effectively help to take decisions by
accelerating the preparation of a set of
recommendations which can be discussed
further.
Recommendations
There are various types of modernization journeys:
from one database to another; migration to cloud;
modernizing frameworks; changing technology etc.
GenAI can significantly speed up modernization
effort by automatically converting parts of the
legacy code to the new, selected technology.
Modernization Execution
In complex projects, a lot of code is doing relatively
repetitive tasks to keep the whole codebase
maintainable and extendable. Writing such code
when modernizing an application takes a lot of
time.
GenAI may write these parts (the code
foundations) for you. Therefore, teams may focus
on business logics instead of doing boring,
repetitive tasks.
Building Foundations
GenAI-supported Modernization
12
• Multiple migration tools like RhinoAI, IBM WatsonX
• Supporting tools – Copilot, RooCode, Cursor, Claude,
Amazon Q
• Open-source LLM models fine-tuned for COBOL, ABAP,
Fortran
Off-the-shelf tools
• Utilizing foundation LLMs and prompt engineering
• Pattern matching
• Custom orchestration
• Full control and automation
• Using cloud-based models, with services like Amazon
Bedrock
Custom approach
13
GenAI-supported Modernization
- Copilot
- Amazon Q
- Perplexity
- Cursor
- ...
Advantages:
- Solve a lot of day-to-day issues
- Enable IDE plugins
Disadvantages:
- Limited flexibility
- Little control on guardrails and system prompts
- Little automation capabilities
- Require a lot of skills to expand the possibilities
of automation tools
14
Why custom tools might be better
We can decide how the system works
under the hood. We can control:
- Guardrails
- System prompts
- Internal system knowledge
- Pattern usage
Full control
We can audit the whole codebases and
other sources. We can automate auditing
processes and generate documents or
reports on-demand.
Audtis can be technology-oriented, client-
oriented, business-oriented etc. We can
adapt the audit process to any external
conditions.
Audit capabilities
Custom tools might work on large
codebases in parallel. We can for instance:
- Process all files at once
- Gather knowledge from many folders
- Work on the big code structure
Massive transformations
Why custom tools might be better
We can use our tools to automate
processes on development side. For
instance, it’s possible to create a
customized hook in the CI/CD process or
automate modernization process.
Process automation
16
Amazon Services for GenAI Modernization
• Amazon Bedrock (Foundation Models - access to leading LLMs: Claude, Amazon, Cohere, Mistral, Llama
etc.)
• Amazon Q (Code Transformation)
• AWS Lambda, EKS, ECS (Cloud Infrastructure – running transformation at scale)
• Amazon SageMaker AI (experimenting, running transformation endpoints)
17
Modernization architecture
Sample scenario
Modernizing a Legacy .NET Monolith
with GenAI
18
19
Input: Legacy .NET Monolith
"We have a 15-year-old ASP.NET Web Forms application, 600,000 lines of C# code. It
manages customer orders, invoicing, and warehouse inventory.”
• Tight coupling between UI, business logic, and data access
• Outdated architecture: no dependency injection, no microservices, no API layer
• Difficult to scale and maintain
• No documentation and no business requirements
• No tests at all
20
Initial Analysis
• Code ingestion - LLM reads the full C# codebase including:
• Web Forms pages
• Business logic classes
• Stored procedures
• Entity Framework or ADO.NET code
• Dependency mapping - GenAI generates:
• Service boundaries
• Data access patterns
• Cross-cutting concerns (logging, security, etc.)
• Hotspots identification - Highlights tightly coupled modules, circular
dependencies, and high-risk areas.
21
Knowledge Extraction
• Business logic mapping - Extracts core business
rules into independent documentation
• UI analysis - Maps page flows, user interactions, form
validations.
• API candidates - Identifies chunks of logic that can
be refactored into REST endpoints.
22
GenAI Transformation & Refactoring
• Propose microservice boundaries - Inventory, Orders, Billing, Customer
Management.
• Rewrite suggestions:
• ASP.NET Web Forms → ASP.NET Core MVC or Blazor
• ADO.NET → EF Core or Dapper
• Inline SQL → Repository pattern
• Boilerplate code generation:
• Controllers, services, DTOs, DI containers
• Swagger/OpenAPI specs for microservices
• Auto-generated integration tests
• Data layer modernization:
• Suggests breaking stored procedures into service methods.
• Generates EF Core migrations where possible.
23
Human-in-the-Loop Review
• Developers review proposed boundaries.
• Code samples reviewed for performance, security, and
compliance.
• Automated tests validate functional equivalence.
24
Done?
No! This process is iterative.
Use cases
26
Features migration in HRM
application
• Features migration from old version of the
HRM application written using custom PHP
framework to the newest version of Symfony
(PHP).
• Staged approach results in code boilerplates
generation:
• Entities
• Repositories
• API specification
• ... and many more
• As a result, manual code migration efficiency
was improved by around 20%.
27
Unit tests generation
• Modules of HR application contained a lot of
non-tested code
• GenAI framework helped to generate unit
tests for non-covered parts of code
• As a result, we saved around 80-90% of time
needed to write unit tests
28
Stored procedures migration
• Accounting application has most of its
business logics written in database in the
form of stored procedures
• Stored procedures are hard to maintain and
test
• Migration to .NET 8 is planned and we’ve
made a POC which aim was to verify the
feasibility of such migration
• Around 30-40% of the time might be saved in
the modernization process
29
Legacy code modernization
for accounting application
• Legacy code modernization from ASP.NET
code to .NET 6.
• Staged approach results in full migration to
the new platform. All necessary components
were auto-generated and the modernization
process requires some refactoring, code
validation and testing.
• Overall, the modernization process efficiency
may be improved by around 20%.
30
Windows-based WPF application
modernization
• Old WPF application (Windows app) should
be migrated to web-based Blazor framework
• Migrating legacy WPF forms to Blazor-based
forms is done with the help of our GenAI
framework
• Initial work is fully done by our framework,
which helps to save between 20-30% of the
time needed to migrate
31
The Challenge of Legacy Systems
Traditional modernization
• Manual rewrites
• Re-architecture
• High risk, long timelines
GenAI supported modernization
• Code understanding at scale
• Automated refactoring
• Lower risk, less frustration, shorter
timelines
xebia.com
Questions?
https://www.linkedin.com/in/krzysztofkakol/

Revolutionizing Application Modernization with AI

  • 1.
    Krzysztof Kąkol Lead SolutionsArchitect | Modernization & GenAI Revolutionizing Application Modernization with AI
  • 2.
    xebia.com Krzysztof Kąkol Lead SolutionsArchitect in Xebia AWS Community Builder & AWS Ambassador https://www.linkedin.com/in/krzysztofkakol/ Other stuff: Classical and jazz pianist PhD in AI-driven sound processing
  • 3.
    Presentation overview 3 The Challengeof Legacy Systems How GenAI Transforms Code Modernization GenAI-enhanced modernization on AWS Real-life scenario Sample use cases
  • 4.
    4 The Challenge ofLegacy Systems 75% of enterprise code is still in legacy languages (COBOL, Fortran, VB6, etc.) 42% of time wasted managing technical debt Avg. technical debt cost: $361,000 per 100,000 lines of code
  • 5.
    5 The Challenge ofLegacy Systems Business Drivers • Lack of skilled developers • Cost of maintenance • Performance & scalability issues • Security & compliance risks • Technical debt accumulation
  • 6.
    How GenAI TransformsCode Modernization 6 • Automates code analysis • Extracts non-existing documentation • Reduces manual effort and error rates • Removes “curse of the blank page” • Reduces team frustration – allows to focus on interesting things
  • 7.
    Key Benefits &Challenges 7 • Code comprehension at scale • Semantic translation (not just syntax) • Documentation recovery • SME knowledge extraction • Safer & faster modernization pipelines Key Benefits • Hallucinations & verification challenges • Regulatory & safety concerns • Human-in-the-loop still critical Challenges
  • 8.
    GenAI-supported Modernization 8 • Codeinventory + analysis • LLM-powered transformation • Human review + validation • Continuous test-driven verification • Deploy incrementally The new modernization workflow
  • 9.
  • 10.
    10 Where GenAI helps GenAIspeeds up initial investigation – it may detect technology, frameworks used, technical dependencies, and many more. Therefore, the process of modernization can be started quickly without spending hours on initial code and tech stack analysis. Initial Investigation Detecting technical debt is one of the most challenging parts in the modernization process. Many various factors must be taken into consideration (eg. security), and initial analysis might be difficult. GenAI can be used to provide information about detected technical debt in minutes. This can be used to speed up further code and architecture analysis. Detecting Technical Debt Most of the legacy software has little to no documentation. It is crucial to understand the purpose of modernized modules or programs. Such documentation can be automatically created, with a required level of detail – from an executive summary to a detailed description of certain classes or parts of code. Preparing Documentation
  • 11.
    11 Where GenAI helps Efficientmodernization planning is a huge challenge. Multiple ideas must be evaluated against business requirements and expected outcomes. GenAI may effectively help to take decisions by accelerating the preparation of a set of recommendations which can be discussed further. Recommendations There are various types of modernization journeys: from one database to another; migration to cloud; modernizing frameworks; changing technology etc. GenAI can significantly speed up modernization effort by automatically converting parts of the legacy code to the new, selected technology. Modernization Execution In complex projects, a lot of code is doing relatively repetitive tasks to keep the whole codebase maintainable and extendable. Writing such code when modernizing an application takes a lot of time. GenAI may write these parts (the code foundations) for you. Therefore, teams may focus on business logics instead of doing boring, repetitive tasks. Building Foundations
  • 12.
    GenAI-supported Modernization 12 • Multiplemigration tools like RhinoAI, IBM WatsonX • Supporting tools – Copilot, RooCode, Cursor, Claude, Amazon Q • Open-source LLM models fine-tuned for COBOL, ABAP, Fortran Off-the-shelf tools • Utilizing foundation LLMs and prompt engineering • Pattern matching • Custom orchestration • Full control and automation • Using cloud-based models, with services like Amazon Bedrock Custom approach
  • 13.
    13 GenAI-supported Modernization - Copilot -Amazon Q - Perplexity - Cursor - ... Advantages: - Solve a lot of day-to-day issues - Enable IDE plugins Disadvantages: - Limited flexibility - Little control on guardrails and system prompts - Little automation capabilities - Require a lot of skills to expand the possibilities of automation tools
  • 14.
    14 Why custom toolsmight be better We can decide how the system works under the hood. We can control: - Guardrails - System prompts - Internal system knowledge - Pattern usage Full control We can audit the whole codebases and other sources. We can automate auditing processes and generate documents or reports on-demand. Audtis can be technology-oriented, client- oriented, business-oriented etc. We can adapt the audit process to any external conditions. Audit capabilities Custom tools might work on large codebases in parallel. We can for instance: - Process all files at once - Gather knowledge from many folders - Work on the big code structure Massive transformations
  • 15.
    Why custom toolsmight be better We can use our tools to automate processes on development side. For instance, it’s possible to create a customized hook in the CI/CD process or automate modernization process. Process automation
  • 16.
    16 Amazon Services forGenAI Modernization • Amazon Bedrock (Foundation Models - access to leading LLMs: Claude, Amazon, Cohere, Mistral, Llama etc.) • Amazon Q (Code Transformation) • AWS Lambda, EKS, ECS (Cloud Infrastructure – running transformation at scale) • Amazon SageMaker AI (experimenting, running transformation endpoints)
  • 17.
  • 18.
    Sample scenario Modernizing aLegacy .NET Monolith with GenAI 18
  • 19.
    19 Input: Legacy .NETMonolith "We have a 15-year-old ASP.NET Web Forms application, 600,000 lines of C# code. It manages customer orders, invoicing, and warehouse inventory.” • Tight coupling between UI, business logic, and data access • Outdated architecture: no dependency injection, no microservices, no API layer • Difficult to scale and maintain • No documentation and no business requirements • No tests at all
  • 20.
    20 Initial Analysis • Codeingestion - LLM reads the full C# codebase including: • Web Forms pages • Business logic classes • Stored procedures • Entity Framework or ADO.NET code • Dependency mapping - GenAI generates: • Service boundaries • Data access patterns • Cross-cutting concerns (logging, security, etc.) • Hotspots identification - Highlights tightly coupled modules, circular dependencies, and high-risk areas.
  • 21.
    21 Knowledge Extraction • Businesslogic mapping - Extracts core business rules into independent documentation • UI analysis - Maps page flows, user interactions, form validations. • API candidates - Identifies chunks of logic that can be refactored into REST endpoints.
  • 22.
    22 GenAI Transformation &Refactoring • Propose microservice boundaries - Inventory, Orders, Billing, Customer Management. • Rewrite suggestions: • ASP.NET Web Forms → ASP.NET Core MVC or Blazor • ADO.NET → EF Core or Dapper • Inline SQL → Repository pattern • Boilerplate code generation: • Controllers, services, DTOs, DI containers • Swagger/OpenAPI specs for microservices • Auto-generated integration tests • Data layer modernization: • Suggests breaking stored procedures into service methods. • Generates EF Core migrations where possible.
  • 23.
    23 Human-in-the-Loop Review • Developersreview proposed boundaries. • Code samples reviewed for performance, security, and compliance. • Automated tests validate functional equivalence.
  • 24.
  • 25.
  • 26.
    26 Features migration inHRM application • Features migration from old version of the HRM application written using custom PHP framework to the newest version of Symfony (PHP). • Staged approach results in code boilerplates generation: • Entities • Repositories • API specification • ... and many more • As a result, manual code migration efficiency was improved by around 20%.
  • 27.
    27 Unit tests generation •Modules of HR application contained a lot of non-tested code • GenAI framework helped to generate unit tests for non-covered parts of code • As a result, we saved around 80-90% of time needed to write unit tests
  • 28.
    28 Stored procedures migration •Accounting application has most of its business logics written in database in the form of stored procedures • Stored procedures are hard to maintain and test • Migration to .NET 8 is planned and we’ve made a POC which aim was to verify the feasibility of such migration • Around 30-40% of the time might be saved in the modernization process
  • 29.
    29 Legacy code modernization foraccounting application • Legacy code modernization from ASP.NET code to .NET 6. • Staged approach results in full migration to the new platform. All necessary components were auto-generated and the modernization process requires some refactoring, code validation and testing. • Overall, the modernization process efficiency may be improved by around 20%.
  • 30.
    30 Windows-based WPF application modernization •Old WPF application (Windows app) should be migrated to web-based Blazor framework • Migrating legacy WPF forms to Blazor-based forms is done with the help of our GenAI framework • Initial work is fully done by our framework, which helps to save between 20-30% of the time needed to migrate
  • 31.
    31 The Challenge ofLegacy Systems Traditional modernization • Manual rewrites • Re-architecture • High risk, long timelines GenAI supported modernization • Code understanding at scale • Automated refactoring • Lower risk, less frustration, shorter timelines
  • 32.