LyraLearn AI Learning Platform
Exams
← Module 24 Β· Design Exercises and Exam Readiness
🎧 Listen

Worked Design β€” AI in a Legacy MVC Application

Second rehearsal scenario, and the one most working .NET architects will actually face: a 15-year-old ASP.NET MVC line-of-business application β€” thousands of users, a SQL Server schema nobody fully remembers, and an executive asking "where does AI fit?" The common failing answer is proposing a rewrite. The scoring answer is adding AI without destabilizing the monolith.

A legacy monolith staying authoritative while an AI sidecar service reads data through a read-only channel, with all writes blocked and forced through the monolith's own service layer.

Triage the opportunities

Run step one of the method across the whole application, not one feature. Three candidates almost always surface, and they map directly onto the capstone blueprint:

Notice what triage excludes: nothing here touches the order-processing path. High-risk core workflows earn AI last, if ever. Trade-off aloud: you are leaving the flashiest demo on the table in exchange for shipping safely.

Integrate without destabilizing

The architectural rule that carries this design: the monolith stays authoritative. AI lives in a sidecar service β€” a modern .NET API alongside the MVC app (a container next to the IIS box, or an Azure App Service) β€” and the monolith calls it over HTTP like any other dependency.

Trade-off: a sidecar adds a network hop and a second deployable. Against "AI bug takes down the LOB app," that cost is trivial β€” say so.

Phase the rollout, cheapest risk first

Sequence by risk, not by impact: (1) AI-ready repo β€” days of work, no runtime footprint; (2) internal doc-QA for one pilot team, with a golden set and refusal monitoring from day one; (3) ops assistant, read-only, once retrieval quality is proven on phase 2's telemetry. Each phase ships value, builds the evaluation habit, and earns trust for the next. When the interviewer asks "why not start with the customer-facing feature?", the answer is the method: requirements said the monolith must not wobble, so the cheapest-risk phase goes first β€” because of that requirement, not because of caution for its own sake.

🧠 Quiz yourself on this lesson →

Ask the AI Tutor

Grounded in the course lessons β€” it cites its sources and says when it doesn't know.