OMGT Frontend Decoupling Assessment
1. Executive Summary
[!IMPORTANT] Strategic Reset (Jan 2026): Due to the high complexity identified below, the full migration of the core
OrderMGTto Headless is POSTPONED INDEFINITELY. The strategy is now Hybrid: keep Kendo MVC for the core, use React/Headless only for new peripheral modules.
Decoupling the WepNG_OMGT frontend is a high-complexity and high-effort operation. The current architecture is a heavily coupled "Monolithic MVC Application" (.NET 4.8), where presentation and business logic are intertwined through Razor Views, ViewBag, Session, and legacy UI libraries (Kendo UI for MVC).
This is not a simple "restyling", but a complete re-architecture of the presentation layer.
2. Current State (Technical Analysis)
- Technology: ASP.NET MVC 5.2.7 on .NET Framework 4.8.
- Frontend Stack: jQuery 2.2.0, Bootstrap, Telerik Kendo UI for MVC.
- Coupling: CRITICAL.
- Views (
.cshtml) depend on server-side objects (html.Kendo().Grid(...)). - Data is passed via
ViewBagandModel(Server-Side Rendering). - Navigation logic is managed by the server (RedirectToAction).
- Views (
- Logic:
- Controllers (e.g.,
OrderController.cs) are massive (> 1000 lines) and mix UI orchestration (redirects, TempData/ViewBag messages) with service calls. - JSON endpoints exist (e.g.,
GetLightData), which is positive, but they are a minority compared to HTML rendering.
- Controllers (e.g.,
- Dimensions:
- The
OrderMGTarea alone counts ~50 Controllers and hundreds of views/partials. - Massive use of "Partial Views" makes clean component extraction difficult.
- The
3. Recommended Strategy: "Strangler Fig Pattern"
I strongly advise against a "Big Bang Rewrite" (rewriting everything from scratch at once), as the risk of introducing regressions and blocking development for months/years is too high.
Gradual Approach (Hybrid):
- Pilot (Vertical Slice): Choose a single isolated feature (e.g., "Light Search" or a specific order detail tab).
- API Layer: Expose necessary data via
WepNG_API(or new API controllers inOMGTreturning only JSON). - Modern Frontend: Introduce a modern framework (React, Vue, or Angular) in a separate project (dedicated repo or folder).
- Embedding: Load the new "mini-app" inside the existing MVC View (emptying it of Razor content and leaving only the container
div). - Iteration: Repeat module by module until the old MVC becomes just an empty shell, then remove it.
4. Cost Estimates (T-Shirt Sizing)
Estimates are expressed in terms of effort for a Team of 2-3 Senior Developers.
| Phase | Description | Estimate (Time/Resources) | Complexity |
|---|---|---|---|
| Setup & Pilot | Framework choice, build pipeline setup (Webpack/Vite), Auth (JWT?), Implementation of 1st "Simple" Page. | 1 Month | Medium |
| Order MGT Core | Migration of OrderController (Overview, Details, main Tabs). Removal of Kendo UI Grid (logic rewrite in JS). | 6-9 Months | Very High |
| Configuration Area | Migration of management tables and configurations. | 3-4 Months | Medium |
| Full Project | Completion of all areas (InboundMGT, OutboundMGT, etc.) | 12-18 Months+ | High |
Total Estimated (OrderMGT + Core): ~6-9 Man-Months (to have a working version of the operating core).
Main Cost Drivers (What raises the price):
- Kendo UI Migration: All "Free" logic offered by Kendo (filtering, sorting, grouping, excel export) must be rewritten or licensed on a new JS library (e.g., AG Grid, TanStack Table).
- Validation Logic: Validation (currently server-side DataAnnotations) must be replicated on the client.
- Session Management: Moving from Server Session to Stateless (Token) requires backend refactoring.
5. Technical Prerequisites
Before starting, it is necessary to:
- Decide on the Backend Stack (React/Vue/Angular).
- Define the Authentication strategy (OAuth2/OpenID Connect) to support SPA + API.
- Create a Modern Build Environment (Node.js, CI/CD for the frontend).