Skip to content

EmeaAppGbb/appmodlab-spec2cloud-dotnet-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŽฎ SPEC2CLOUD .NET FRAMEWORK MODERNIZATION ๐ŸŽฎ

โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—      โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— 
โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ•šโ•โ•โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—
โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—  โ–ˆโ–ˆโ•‘      โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘
โ•šโ•โ•โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ• โ–ˆโ–ˆโ•”โ•โ•โ•  โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•”โ•โ•โ•โ• โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘
โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘     โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•
โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ•     โ•šโ•โ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•šโ•โ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•šโ•โ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•  โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ• 
                                                                                    
             ๐ŸŒ† WEB FORMS TO MODERN ๐ŸŒ† KILLING VIEWSTATE ONE PAGE AT A TIME ๐Ÿ’€

๐Ÿ•น๏ธ OVERVIEW

GAME STATUS: ๐ŸŸข READY TO PLAY
DIFFICULTY: โญโญโญโญ HARD MODE
BOSS BATTLE: VIEWSTATE MONSTER ๐Ÿ‘พ

Welcome to the ultimate modernization arcade! This lab takes you on a neon-soaked journey from the dark ages of ASP.NET Web Forms 4.8 to the bright future of .NET 9. Using the legendary Spec2Cloud methodology, you'll reverse-engineer a legacy municipal permit system and rebuild it with modern tech โ€” all driven by auto-generated specifications!

๐Ÿ›๏ธ Mission: Modernize "Riverdale City Council" building permit system
๐Ÿ“‹ Method: SPEC โ†’ CODE methodology
๐Ÿ’€ Enemy: ViewState, DataSets, Crystal Reports, UpdatePanels
๐ŸŽฏ Victory: Azure-hosted .NET 9 app with Blazor superpowers

๐ŸŽฏ WHAT YOU'LL LEARN

๐Ÿ”ฎ SPEC2CLOUD MASTERY

  • ๐Ÿ“‹ SPEC GENERATION โ€” Reverse-engineer legacy codebases into comprehensive specifications
  • ๐Ÿ—บ๏ธ BLUEPRINT READY โ€” Use architecture docs, API contracts, and data models as your modernization guide
  • ๐Ÿ”„ SPEC โ†’ CODE โ€” Drive implementation directly from generated specifications
  • ๐Ÿ“Š DECISION TRACKING โ€” Document modernization choices in the specs themselves

โš”๏ธ WEB FORMS BOSS BATTLES

  • ๐Ÿ’€ VIEWSTATE ELIMINATED โ€” Replace 200KB+ ViewState pages with stateless MVC/Blazor
  • ๐Ÿ”ฅ UPDATEPANEL DESTROYED โ€” Swap fake AJAX for real Blazor Server interactivity
  • ๐Ÿ—„๏ธ DATASET PURGED โ€” Convert ADO.NET DataSets to strongly-typed EF Core entities
  • ๐Ÿ“ CRYSTAL REPORTS REPLACED โ€” Generate PDFs with QuestPDF instead of Crystal Reports
  • ๐Ÿง™ STORED PROC LOGIC REFACTORED โ€” Extract business rules into domain services

๐Ÿš€ MODERN TECH UNLOCKED

  • โœจ ASP.NET Core MVC + Blazor for hybrid rendering
  • ๐Ÿ’Ž Entity Framework Core 9 with repository pattern
  • โ˜๏ธ Azure Services โ€” App Service, SQL Database, Redis Cache, Blob Storage
  • ๐Ÿ” Entra ID Authentication with role-based access
  • ๐Ÿ” Azure AI Search for permit lookup

๐Ÿ“ฆ PREREQUISITES

๐ŸŽฎ PLAYER REQUIREMENTS

  • ๐Ÿง  Skills: C# and ASP.NET experience
  • ๐Ÿ“š Knowledge: Basic Spec2Cloud concepts
  • ๐Ÿ’ช Level: Intermediate-Advanced .NET developer

๐Ÿ› ๏ธ EQUIPMENT LOADOUT

  • โœ… .NET Framework 4.8 Developer Pack (for legacy app)
  • โœ… .NET 9 SDK (for modernized app)
  • โœ… Visual Studio 2022 (your primary weapon)
  • โœ… SQL Server LocalDB (database arena)
  • โœ… Azure Subscription (cloud battleground)
  • โœ… Git (version control shield)
  • โœ… GitHub Copilot CLI (your AI companion)

๐Ÿ’ป INSTALLATION SPELLS

# Verify .NET installations
dotnet --list-sdks
dotnet --list-runtimes

# Install GitHub Copilot CLI (if not already installed)
gh copilot --version

# Clone the repository
git clone https://github.com/EmeaAppGbb/appmodlab-spec2cloud-dotnet-framework.git
cd appmodlab-spec2cloud-dotnet-framework

๐Ÿš€ QUICK START

๐ŸŽฒ LEVEL 1: RUN THE LEGACY APP

# Switch to legacy branch
git checkout legacy

# Restore and run the Web Forms app
cd RiverdalePermitSystem
dotnet restore
dotnet run --project RiverdalePermitSystem.Web

๐ŸŒ Navigate to https://localhost:5001 and experience the horror of ViewState! ๐Ÿ‘ป

๐Ÿ“‹ LEVEL 2: GENERATE SPECS

# Use Spec2Cloud to analyze the legacy codebase
gh copilot suggest "Run Spec2Cloud analysis on the RiverdalePermitSystem solution"

# Review generated specifications
git checkout step-1-spec-generation
# Examine: /specs/architecture.md, /specs/api-contracts/, /specs/data-models/

๐Ÿ—บ๏ธ BLUEPRINT READY โ€” Specifications captured! ๐ŸŽŠ

๐Ÿ”„ LEVEL 3: MODERNIZE USING SPECS

# Follow the step-by-step branches
git checkout step-3-data-layer    # Build EF Core entities from data model specs
git checkout step-4-business-logic # Implement services from business rule specs
git checkout step-5-ui-migration   # Build MVC/Blazor from page specs

๐Ÿ† FINAL BOSS: DEPLOY TO AZURE

git checkout step-6-deploy
# Deploy using provided Bicep templates
gh copilot suggest "Deploy the modernized app to Azure using the infrastructure/main.bicep template"

๐ŸŽ‰ VICTORY ACHIEVED โ€” ViewState monster defeated! ๐Ÿ…

๐Ÿ“ PROJECT STRUCTURE

appmodlab-spec2cloud-dotnet-framework/
โ”œโ”€โ”€ ๐ŸŽฎ README.md                           โ† YOU ARE HERE
โ”œโ”€โ”€ ๐Ÿ“š APPMODLAB.md                         โ† Full lab walkthrough
โ”œโ”€โ”€ ๐Ÿ›๏ธ RiverdalePermitSystem/              โ† Legacy Web Forms app (legacy branch)
โ”‚   โ”œโ”€โ”€ RiverdalePermitSystem.sln
โ”‚   โ”œโ”€โ”€ RiverdalePermitSystem.Web/
โ”‚   โ”‚   โ”œโ”€โ”€ Pages/                         โ† Web Forms pages (.aspx)
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ PermitApplication.aspx     โ† Multi-step wizard with ViewState ๐Ÿ’€
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ PlanReview.aspx            โ† Plan review workflow
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ InspectionSchedule.aspx    โ† Inspector scheduling grid
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ PermitSearch.aspx          โ† GridView + ObjectDataSource
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Dashboard.aspx             โ† UpdatePanels for "AJAX" ๐Ÿ”ฅ
โ”‚   โ”‚   โ”œโ”€โ”€ UserControls/                  โ† Reusable .ascx controls
โ”‚   โ”‚   โ”œโ”€โ”€ Reports/                       โ† Crystal Reports (.rpt) ๐Ÿ“
โ”‚   โ”‚   โ””โ”€โ”€ App_Code/                      โ† DataSet-based data access ๐Ÿ—„๏ธ
โ”‚   โ””โ”€โ”€ Database/                          โ† Schema + 40+ stored procedures
โ”œโ”€โ”€ ๐Ÿš€ RiverdalePermitSystem.Modern/       โ† .NET 9 app (solution branch)
โ”‚   โ”œโ”€โ”€ RiverdalePermitSystem.Modern.sln
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ Web/                           โ† ASP.NET Core MVC + Blazor
โ”‚   โ”‚   โ”œโ”€โ”€ Core/                          โ† Domain models and interfaces
โ”‚   โ”‚   โ”œโ”€โ”€ Infrastructure/                โ† EF Core, repositories, services
โ”‚   โ”‚   โ””โ”€โ”€ Shared/                        โ† Blazor components
โ”‚   โ””โ”€โ”€ tests/
โ”œโ”€โ”€ ๐Ÿ“‹ specs/                              โ† Spec2Cloud generated specs (step-1)
โ”‚   โ”œโ”€โ”€ architecture.md                    โ† System architecture blueprint
โ”‚   โ”œโ”€โ”€ api-contracts/                     โ† API endpoint specifications
โ”‚   โ”œโ”€โ”€ data-models/                       โ† Entity and database specs
โ”‚   โ”œโ”€โ”€ business-rules/                    โ† Business logic documentation
โ”‚   โ””โ”€โ”€ page-flows/                        โ† UI workflow specifications
โ””โ”€โ”€ โ˜๏ธ infrastructure/                     โ† Azure deployment (step-6)
    โ”œโ”€โ”€ main.bicep                         โ† Infrastructure as Code
    โ””โ”€โ”€ parameters.json                    โ† Configuration values

๐Ÿ‘พ LEGACY STACK (FINAL BOSS DETAILS)

๐Ÿ”ด ENEMY ROSTER

๐Ÿ’€ ENEMY ๐ŸŽฏ WEAKNESS ๐Ÿ† REPLACEMENT
ViewState (200KB+ pages) Stateless architecture Blazor Server state management
UpdatePanels (fake AJAX) Real interactivity Blazor components with SignalR
DataSets (transport objects) Strong typing EF Core entities
Stored Proc Logic (business rules in DB) Domain-driven design Domain services in C#
Crystal Reports (hard-coded connections) Modern PDF generation QuestPDF
Session State (SQL Server storage) Distributed caching Azure Redis Cache
Code-Behind (mixed concerns) Separation of concerns MVC pattern + Blazor

๐Ÿ—„๏ธ DATABASE SCHEMA

๐Ÿ“Š Permits          โ† Permit applications and issuance tracking
๐Ÿ“‹ PlanReviews      โ† Architectural/engineering review workflows
๐Ÿ” Inspections      โ† Scheduled inspections and results
๐Ÿ‘ค Applicants       โ† Property owners and builders
๐Ÿ—๏ธ Contractors      โ† Licensed contractors database
๐Ÿ’ฐ Fees             โ† Permit fees and payment tracking

๐Ÿงฉ LEGACY ANTI-PATTERNS DETECTED

  • โš ๏ธ Business logic in code-behind event handlers โ€” No separation of concerns
  • โš ๏ธ 40+ stored procedures with business rules โ€” Logic trapped in database
  • โš ๏ธ DataSets stored in session โ€” Memory bloat and serialization overhead
  • โš ๏ธ Static helper classes โ€” Untestable, global state
  • โš ๏ธ ViewState bloat โ€” Pages exceed 200KB per request
  • โš ๏ธ No dependency injection โ€” Tight coupling everywhere
  • โš ๏ธ Minimal test coverage โ€” Changes are risky

๐ŸŽฏ TARGET ARCHITECTURE

๐ŸŸข POWER-UPS UNLOCKED

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  ๐ŸŒ FRONTEND                                                     โ”‚
โ”‚  โ”œโ”€โ”€ ASP.NET Core MVC (static content)                          โ”‚
โ”‚  โ”œโ”€โ”€ Blazor Server (interactive permit wizard, dashboards)      โ”‚
โ”‚  โ””โ”€โ”€ Razor Components (reusable UI elements)                    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  ๐Ÿง  BUSINESS LAYER                                               โ”‚
โ”‚  โ”œโ”€โ”€ Domain Services (permit validation, fee calculation)       โ”‚
โ”‚  โ”œโ”€โ”€ Repository Pattern (data access abstraction)               โ”‚
โ”‚  โ””โ”€โ”€ Specification Pattern (complex queries)                    โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  ๐Ÿ’พ DATA LAYER                                                   โ”‚
โ”‚  โ”œโ”€โ”€ Entity Framework Core 9 (ORM)                              โ”‚
โ”‚  โ”œโ”€โ”€ Strongly-typed entities (no DataSets!)                     โ”‚
โ”‚  โ””โ”€โ”€ Database migrations (code-first approach)                  โ”‚
โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
โ”‚  โ˜๏ธ AZURE SERVICES                                               โ”‚
โ”‚  โ”œโ”€โ”€ App Service (hosting)                                      โ”‚
โ”‚  โ”œโ”€โ”€ Azure SQL Database (data persistence)                      โ”‚
โ”‚  โ”œโ”€โ”€ Azure Redis Cache (distributed caching)                    โ”‚
โ”‚  โ”œโ”€โ”€ Azure Blob Storage (inspection photos)                     โ”‚
โ”‚  โ”œโ”€โ”€ Azure Communication Services (email notifications)         โ”‚
โ”‚  โ”œโ”€โ”€ Azure AI Search (permit search)                            โ”‚
โ”‚  โ””โ”€โ”€ Entra ID (authentication & authorization)                  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ”„ SPEC โ†’ CODE WORKFLOW

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Legacy Codebase โ”‚ โ”€โ”€โ”€โ†’ โ”‚  Spec2Cloud      โ”‚ โ”€โ”€โ”€โ†’ โ”‚  Specifications  โ”‚
โ”‚  (Web Forms 4.8) โ”‚      โ”‚  Analysis Tool   โ”‚      โ”‚  (Markdown Docs) โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                                              โ”‚
                                                              โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Deployed App    โ”‚ โ†โ”€โ”€โ”€ โ”‚  .NET 9 Build    โ”‚ โ†โ”€โ”€โ”€ โ”‚  Implementation  โ”‚
โ”‚  (Azure)         โ”‚      โ”‚  (MVC + Blazor)  โ”‚      โ”‚  (Spec-driven)   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“‹ SPEC GENERATED โ†’ ๐Ÿ—บ๏ธ BLUEPRINT READY โ†’ ๐Ÿ”„ SPEC โ†’ CODE โ†’ ๐Ÿ’€ VIEWSTATE ELIMINATED โ†’ ๐Ÿ† VICTORY

๐ŸŽฎ LAB WALKTHROUGH USING COPILOT CLI + SPEC2CLOUD

๐Ÿ•น๏ธ STAGE 1: EXPLORATION (30 min)

# Switch to legacy branch and explore the Web Forms horror
git checkout legacy
gh copilot explain "What are the main anti-patterns in this ASP.NET Web Forms application?"
gh copilot suggest "Run the RiverdalePermitSystem locally and test the permit submission workflow"

๐ŸŽฏ Objectives:

  • โœ… Run the legacy Web Forms app
  • โœ… Submit a test permit application
  • โœ… Schedule an inspection
  • โœ… Generate a Crystal Report
  • โœ… Observe ViewState size (check dev tools network tab!)

๐Ÿ•น๏ธ STAGE 2: SPEC GENERATION (1 hour)

# Generate specifications using Spec2Cloud
git checkout step-1-spec-generation
gh copilot suggest "Analyze the Web Forms codebase with Spec2Cloud and generate architecture specifications"

# Review generated specs
gh copilot explain "Explain the generated architecture.md specification"

๐ŸŽฏ Objectives:

  • โœ… Run Spec2Cloud analysis on legacy codebase
  • โœ… Review architecture specifications
  • โœ… Examine API contract definitions
  • โœ… Study data model specifications
  • โœ… Document business rules found in stored procedures

๐Ÿ“‹ SPEC GENERATED โ† You are here!

๐Ÿ•น๏ธ STAGE 3: SPEC REVIEW & DECISIONS (1 hour)

git checkout step-2-spec-review
# Review refined specifications with modernization decisions annotated

๐ŸŽฏ Objectives:

  • โœ… Review each specification for completeness
  • โœ… Identify modernization patterns (DataSet โ†’ Entity, etc.)
  • โœ… Document technology choices in specs
  • โœ… Map Web Forms pages to MVC/Blazor equivalents

๐Ÿ—บ๏ธ BLUEPRINT READY โ† You are here!

๐Ÿ•น๏ธ STAGE 4: BUILD DATA LAYER (1.5 hours)

git checkout step-3-data-layer
gh copilot suggest "Create EF Core entities based on the data model specifications"

# Use Copilot to generate entities from specs
gh copilot chat "Create the Permit entity class based on specs/data-models/permit.md"
gh copilot chat "Create the DbContext with all entities and relationships"

๐ŸŽฏ Objectives:

  • โœ… Create EF Core entities matching data model specs
  • โœ… Configure DbContext with relationships
  • โœ… Implement repository interfaces
  • โœ… Create database migrations
  • โœ… Seed test data

๐Ÿ—„๏ธ DATASET PURGED โ† Boss defeated!

๐Ÿ•น๏ธ STAGE 5: BUILD BUSINESS LAYER (1.5 hours)

git checkout step-4-business-logic
gh copilot suggest "Implement domain services based on business rule specifications"

# Extract logic from stored procedures using specs
gh copilot chat "Convert the usp_ValidatePermitApplication stored procedure to a C# domain service using specs/business-rules/permit-validation.md"

๐ŸŽฏ Objectives:

  • โœ… Create domain service interfaces
  • โœ… Implement permit validation service
  • โœ… Implement fee calculation service
  • โœ… Implement inspection scheduling service
  • โœ… Add unit tests for business logic

๐Ÿง™ STORED PROC LOGIC REFACTORED โ† Boss defeated!

๐Ÿ•น๏ธ STAGE 6: BUILD UI LAYER (2 hours)

git checkout step-5-ui-migration
gh copilot suggest "Create MVC controllers and Blazor components based on page specifications"

# Convert Web Forms pages using specs
gh copilot chat "Convert PermitApplication.aspx to an MVC controller and Blazor wizard component using specs/page-flows/permit-application.md"

๐ŸŽฏ Objectives:

  • โœ… Create MVC controllers and views
  • โœ… Build Blazor components for interactive elements
  • โœ… Implement permit submission wizard (Blazor)
  • โœ… Implement inspection scheduling grid (Blazor)
  • โœ… Build admin dashboard with real-time updates
  • โœ… Replace Crystal Reports with QuestPDF

๐Ÿ’€ VIEWSTATE ELIMINATED โ† Final boss defeated!
๐Ÿ”ฅ UPDATEPANEL DESTROYED โ† Final boss defeated!
๐Ÿ“ CRYSTAL REPORTS REPLACED โ† Final boss defeated!

๐Ÿ•น๏ธ STAGE 7: AZURE DEPLOYMENT (1 hour)

git checkout step-6-deploy
gh copilot suggest "Deploy the application to Azure using the Bicep templates in infrastructure/"

# Deploy infrastructure
az deployment group create --resource-group rg-riverdale-permits \
  --template-file infrastructure/main.bicep \
  --parameters infrastructure/parameters.json

# Deploy application
gh copilot suggest "Publish the .NET 9 application to Azure App Service"

๐ŸŽฏ Objectives:

  • โœ… Provision Azure resources (App Service, SQL, Redis, Blob, etc.)
  • โœ… Configure Entra ID authentication
  • โœ… Deploy application code
  • โœ… Run database migrations in Azure SQL
  • โœ… Configure Azure Communication Services for emails
  • โœ… Test all workflows in production

๐Ÿ† VICTORY ACHIEVED โ€” Game complete! ๐ŸŽŠ

โฑ๏ธ DURATION

๐ŸŽฎ TOTAL PLAYTIME: 6โ€“8 hours

โณ STAGE BREAKDOWN:

  • ๐Ÿ•น๏ธ Stage 1: Exploration โ€” 30 min
  • ๐Ÿ•น๏ธ Stage 2: Spec Generation โ€” 1 hour
  • ๐Ÿ•น๏ธ Stage 3: Spec Review โ€” 1 hour
  • ๐Ÿ•น๏ธ Stage 4: Data Layer โ€” 1.5 hours
  • ๐Ÿ•น๏ธ Stage 5: Business Layer โ€” 1.5 hours
  • ๐Ÿ•น๏ธ Stage 6: UI Layer โ€” 2 hours
  • ๐Ÿ•น๏ธ Stage 7: Azure Deployment โ€” 1 hour

๐Ÿ’ก PRO TIP: Use GitHub Copilot CLI throughout for maximum efficiency! The gh copilot suggest and gh copilot chat commands are your power-ups! ๐Ÿš€

๐Ÿ“š RESOURCES

๐ŸŽ“ LEARNING MATERIALS

๐Ÿ› ๏ธ TOOLS & FRAMEWORKS

โ˜๏ธ AZURE SERVICES

๐ŸŽฎ RELATED LABS


๐Ÿ† ACHIEVEMENTS UNLOCKED

Complete the lab to earn these badges:

  • ๐Ÿฅ‡ ViewState Slayer โ€” Eliminated 200KB+ ViewState pages
  • ๐Ÿฅ‡ UpdatePanel Destroyer โ€” Replaced fake AJAX with Blazor
  • ๐Ÿฅ‡ DataSet Purger โ€” Migrated all DataSets to EF Core entities
  • ๐Ÿฅ‡ Crystal Crusher โ€” Replaced Crystal Reports with QuestPDF
  • ๐Ÿฅ‡ Spec Master โ€” Generated and used specifications throughout modernization
  • ๐Ÿฅ‡ Azure Champion โ€” Successfully deployed to Azure
  • ๐Ÿฅˆ Migration Architect โ€” Completed full modernization workflow
  • ๐Ÿฅˆ .NET Legend โ€” Mastered both .NET Framework and .NET 9

๐ŸŽช GAME OVER... OR JUST BEGINNING?

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                                                                  โ”‚
โ”‚   โ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•—      โ”‚
โ”‚   โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ•šโ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ•šโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•”โ•      โ”‚
โ”‚   โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘        โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ• โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•       โ”‚
โ”‚   โ•šโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘        โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—  โ•šโ–ˆโ–ˆโ•”โ•        โ”‚
โ”‚    โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ• โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•‘   โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘  โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘         โ”‚
โ”‚     โ•šโ•โ•โ•โ•  โ•šโ•โ• โ•šโ•โ•โ•โ•โ•โ•   โ•šโ•โ•    โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•  โ•šโ•โ•   โ•šโ•โ•         โ”‚
โ”‚                                                                  โ”‚
โ”‚             ๐ŸŽ‰ CONGRATULATIONS, SPEC WARRIOR! ๐ŸŽ‰                 โ”‚
โ”‚                                                                  โ”‚
โ”‚  You've defeated the ViewState monster and modernized a legacy  โ”‚
โ”‚  .NET Framework application using the Spec2Cloud methodology!   โ”‚
โ”‚                                                                  โ”‚
โ”‚         ๐Ÿ“‹ SPEC GENERATED โ†’ ๐Ÿ—บ๏ธ BLUEPRINT READY โ†’                โ”‚
โ”‚         ๐Ÿ”„ SPEC โ†’ CODE โ†’ ๐Ÿ’€ VIEWSTATE ELIMINATED                โ”‚
โ”‚                                                                  โ”‚
โ”‚              โญ HIGH SCORE: LEGACY APP MODERNIZED โญ             โ”‚
โ”‚                                                                  โ”‚
โ”‚                   Press START to play again                     โ”‚
โ”‚                 (Try another modernization lab!)                โ”‚
โ”‚                                                                  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐ŸŽฎ Ready Player One? Let's modernize some legacy code! ๐Ÿš€

๐Ÿ“‹ SPEC GENERATED | ๐Ÿ—บ๏ธ BLUEPRINT READY | ๐Ÿ”„ SPEC โ†’ CODE | ๐Ÿ’€ VIEWSTATE ELIMINATED

Built with โค๏ธ by the GBB App Modernization Team
Powered by GitHub Copilot CLI ๐Ÿค– and Spec2Cloud ๐Ÿ“‹

About

๐Ÿ•น๏ธ AppMod Lab: Spec2Cloud methodology for ASP.NET Web Forms to ASP.NET Core migration โ€” HR portal

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors