# WSC-MVC — Technical and Product Specification Version: 0.1 (development specification) Status: Proposed; implementation behavior must be verified on the target Windows/IIS host. ## 1. Mission Build a small, maintainable, WSC-first MVC framework for Classic ASP. IIS receives HTTP traffic; a single ASP bootstrap dispatches requests to VBScript Windows Script Components registered as COM objects. Application behavior lives in WSC files; presentation lives in separate HTML templates. Ship verified increments rather than an elaborate untested framework. ## 2. Fixed decisions - Runtime: Windows, IIS, Classic ASP, VBScript; no ASP.NET, PHP, Node.js, or JScript runtime dependency. - Object architecture: registered `.wsc` COM components; stable ProgIDs and CLSIDs. - Presentation: separate `.html` templates, served only through the rendering layer when containing placeholders or private content. - Entry point: one `Default.asp`, plus IIS rewrite configuration and optional `Global.asa` only if justified. - IIS is a hard runtime requirement for HTTP integration; WSH-based component smoke tests are a separate concern. - Prefer built-in Windows/IIS capabilities and ADODB; no third-party framework required. - Business logic must not reference ASP Request, Response, Server, or Session. - All behavior dependent on WSC/COM/IIS quirks must be tested on Windows and documented; do not infer support from ordinary VBScript class behavior. ## 3. Non-goals for v0.1 No ORM, controller auto-discovery, automatic reflection, hot reload, plugin system, migrations, authentication, session-backed COM instances, application-scoped WSC instances, database-backed example, complex DI, or production-ready HTML parser. Do not implement these speculatively. ## 4. Initial execution path `GET /hello` -> IIS URL Rewrite -> `/Default.asp` -> `Server.CreateObject("WscMvc.Application")` -> `Application.Run(...)` -> `WscMvc.HomeController` -> string/response contract -> HTTP 200, `text/html; charset=utf-8`, body `Hello from WSC-MVC!`. Prefer a bootstrap with `Option Explicit`, no business logic, no includes, no embedded HTML, and only request-host wiring. Define and verify a precise ownership rule for HTTP status, headers, and writing: do not write a partially successful response before dispatch can fail. Test whether COM calls can accept the proposed ASP built-in objects; if passing an object fails, use a tested host adapter or pass only primitive request data. Do not silently assume an ASP object is serializable or universally callable from WSC. ## 5. Target project structure ``` WSC-MVC/ Default.asp web.config Framework/ Application.wsc Router.wsc # phase 3 RequestContext.wsc # phase 2; only after host interop proven ResponseResult.wsc # phase 2; optional if simpler contract works ViewRenderer.wsc # phase 4 Controllers/ HomeController.wsc Views/ Home.html # phase 4 Layout.html # phase 4 tests/ Test-Components.vbs Test-Http.ps1 tools/ Register-Components.ps1 Unregister-Components.ps1 docs/ ARCHITECTURE.md DECISIONS.md TEST-RESULTS.md SPEC.md IMPLEMENTATION_PLAN.md AGENTS.md CLAUDE.md README.md ``` The tree is a target, not an instruction to create placeholder classes before their phase. ## 6. Component contract - Each `.wsc` represents one named, cohesive component. The `.wsc` XML `` establishes COM identity; `` explicitly lists callable methods/properties; `