DEV Community

Dhruv Joshi for Quokka Labs

Posted on

Modern Web Portals: When Should a Legacy Mainframe Stay Behind APIs?

IBM's October 2026 announcement of Z Atlas challenges the assumption that mainframes must disappear for enterprises to modernize.

I would argue something more controversial: rewriting a reliable mainframe to launch a modern web portal can be an architectural mistake disguised as innovation.

When Should a Legacy Mainframe Stay Behind APIs?

I recommend keeping a legacy mainframe behind APIs when its business logic remains reliable, transactions require strong consistency, infrastructure remains supportable, and modernization primarily concerns user experience. An API-first architecture allows independent frontend development while preserving critical operations, reducing migration exposure, and creating a controlled path toward future backend replacement.

At Quokka Labs, I approach web application development services by separating what needs improvement from what already works.

A modern interface does not automatically require a modern transaction engine.

Five Conditions That Justify Retaining the Mainframe

  • Reliable business logic: Existing rules correctly handle complex financial or operational transactions.
  • High replacement risk: Rewriting could introduce calculation errors or compliance failures.
  • Stable transaction boundaries: Business operations can be exposed through well-defined APIs.
  • Supportable infrastructure: Security updates, operational expertise, and vendor support remain available.
  • Acceptable economics: Retention costs are lower than the risk-adjusted cost of replacement.

If these conditions hold, I prioritize API enablement over wholesale migration.

How I Choose Between Retention, Refactoring, and Replacement

I evaluate individual business capabilities rather than treating the entire mainframe as one modernization project.

Decision factor Retain behind APIs Incrementally refactor Replace
Business rules Reliable Increasing complexity No longer suitable
Infrastructure Supported Approaching limitations Unsupported
API integration Manageable Requires restructuring Unworkable
Performance Meets requirements Selective bottlenecks Persistent failures
Operating costs Justifiable Increasing Unsustainable
Migration risk High Controllable Acceptable

I might retain payment processing while replacing reporting, document management, and customer onboarding.

Web Application Development Services: Designing the BFF Architecture

For custom web application development involving mainframes, I use a Backend for Frontend (BFF) when portal-specific orchestration, security, or response formatting justifies an independent backend layer.

The objective is not simply to wrap COBOL programs in REST endpoints. It is to prevent legacy implementation details from becoming permanent frontend dependencies.

Quokka Labs Reference Architecture: BFF With Service Boundaries

          MODERN WEB PORTAL
       React / Angular / Vue
                 |
              HTTPS
                 |
           API GATEWAY
       Access / Rate Limits
                 |
        BACKEND FOR FRONTEND
      Sessions / Aggregation
                 |
       +---------+---------+
       |                   |
       v                   v
  MODERN SERVICES     LEGACY ADAPTER
  ----------------    ----------------
  Notifications       Data Translation
  Documents           Error Mapping
  User Preferences    API Contracts
       |                   |
       v                   v
  Modern Database      Private APIs
                           |
                    MAINFRAME BOUNDARY
                    ------------------
                    COBOL / CICS / IMS
                    Business Rules
                    Transaction Engine
                    System of Record
Enter fullscreen mode Exit fullscreen mode

Original conceptual architecture by Quokka Labs.

What Each Layer Should Own

Component Responsibility
Web portal Presentation and user interaction
API gateway Traffic controls and token validation
BFF Portal-specific sessions and response composition
Legacy adapter Protocol translation and contract isolation
Modern services Independently owned business capabilities
Mainframe Retained transactions and authoritative records

I follow the principles behind Microsoft's Backend for Frontend pattern and anti-corruption layer.

How I Implement Mainframe APIs Without Creating New Technical Debt

1. Design Business APIs, Not Program Wrappers

I expose business capabilities rather than internal program identifiers.

GET  /api/v1/members/{id}/benefits
POST /api/v1/claims
GET  /api/v1/claims/{id}/status
Enter fullscreen mode Exit fullscreen mode

I avoid interfaces that expose COBOL copybooks, database schemas, or mainframe-specific error codes directly.

For IBM Z environments, IBM z/OS Connect is one option for exposing existing transactions through REST APIs.

2. Protect Transaction Integrity

I enforce four rules:

  • Assign one authoritative writer to each business record.
  • Use idempotency keys for retryable write operations.
  • Apply bounded retries, timeouts, and circuit breakers.
  • Reconcile uncertain transaction outcomes before retrying.

What Happens When a Mainframe API Times Out?

A timeout does not prove that a transaction failed.

I check the transaction status before repeating a financial or benefits-related operation. Otherwise, automatic retries could produce duplicate claims, payments, or account updates.

3. Separate Read Traffic From Transaction Traffic

I consider event-driven read models or change data capture for dashboards and historical reporting where the legacy platform supports them.

I keep critical writes within the authoritative transaction boundary until ownership is deliberately transferred.

When displaying replicated information, I expose its freshness timestamp rather than presenting potentially stale data as real-time information.

4. Secure the Integration Boundary

I implement:

  • Object-level authorization.
  • Private network connectivity and encrypted service communication.
  • Restricted service identities.
  • Sensitive-data masking.
  • End-to-end audit trails.

An API gateway alone does not make a legacy system secure.

Where AI introduces additional access paths or automated decisions, I incorporate trustworthy ai security services into the architecture.

Real-World Buyer Signal: South Carolina PEBA Modernization

The South Carolina Public Employee Benefit Authority is pursuing modernization of its Natural/Adabas systems into Java and a modern database environment.

The official procurement listing, solicitation 5400030342, identifies January 4, 2027, as the submission deadline.

According to the procurement scope, the initiative covers:

  • Proof of technology.
  • Insurance system modernization.
  • Retirement system modernization.
  • Functional equivalence and knowledge transfer.

I interpret this as evidence that enterprise buyers need controlled modernization with measurable correctness, not merely rewritten code.

PEBA is pursuing conversion rather than permanent retention. However, a stable API boundary could be evaluated as a transition strategy for comparable modernization programs.

When Should I Stop Retaining the Mainframe?

I recommend moving beyond API-based mainframe retention when the underlying platform cannot meet security, performance, supportability, or economic requirements. APIs cannot permanently compensate for unreliable business logic, unsupported infrastructure, or excessive operating costs. At that point, incremental replacement through stable service contracts provides a more sustainable modernization path than adding further integration layers.

My Production Readiness Scorecard

Metric Illustrative acceptance target
Portal API p95 latency Under 500 ms for selected reads
API availability 99.95%
Critical transaction reconciliation 100%
Duplicate committed transactions Zero
Unauthorized data access Zero
Rollback procedure Successfully tested

I adjust these targets according to workload characteristics and business requirements. They are engineering acceptance criteria, not universal guarantees.

Can AI Modernize Mainframe Applications Without Rewriting Them?

I use AI-assisted engineering to analyze legacy dependencies, document business rules, generate candidate test cases, and identify potential service boundaries. AI can accelerate modernization analysis without replacing the mainframe itself. However, transaction equivalence must still be demonstrated through deterministic testing, reconciliation, security validation, and human approval before generated changes enter production.

I also consider ai workflow automation services for surrounding administrative processes without giving AI systems unrestricted access to critical transactions.

My Final Recommendation for Enterprise Engineering Teams

I measure modernization success through faster delivery, reliable transactions, manageable operating costs, and independent deployment.

I do not measure it by how much COBOL disappears.

For Raleigh application development teams evaluating regional engineering partners, the same principle applies: architecture and integration expertise matter more than the frontend framework.

If you are comparing application development raleigh north carolina providers, ask how they handle system-of-record ownership, rollback, and transaction integrity before discussing interface design.

Through Quokka Labs' application modernization services, I recommend starting with one business capability, validating its API boundary, and expanding only when the evidence supports it.

My question for the DEV community: If your mainframe meets every business and operational requirement, what measurable benefit would justify rewriting it?

I would rather defend a reliable transaction engine than debug an unnecessary rewrite in production.

Top comments (0)