# WSC-MVC — Architecture (as implemented through M1) ## Request flow ``` GET /hello -> IIS URL Rewrite rule "WscMvc-Hello" (^hello/?$) -> /Default.asp?route=/hello -> Server.CreateObject("WscMvc.Application") -> Application.Run("/hello", statusLine, contentType, body) [Framework/Application.wsc] -> CreateObject("WscMvc.HomeController") -> HomeController.Hello(body) [Controllers/HomeController.wsc] -> Default.asp sets Response.Status/ContentType, writes body ``` ## Component boundary contract - `Default.asp` is the only file that touches ASP intrinsic objects (`Request`, `Response`, `Server`). It contains no business logic — only reading the `route` query parameter, invoking `WscMvc.Application`, and writing the response. - `Framework/Application.wsc` and `Controllers/HomeController.wsc` never reference `Request`/`Response`/`Server`/`Session`. All data crosses the ASP-to-WSC and WSC-to-WSC boundaries as VBScript scalars (strings), passed by VBScript's default ByRef semantics for "out" values. See `docs/DECISIONS.md` for why this sidesteps SPEC §15's open question about passing ASP intrinsics into WSC. - Routing in M1 is a single hardcoded `If pathInfo = "/hello"` check inside `Application.Run`. This is intentionally minimal and will be replaced by the explicit allowlisted route table in M3 (`Router.wsc`); do not extend it ad hoc before that milestone. ## COM identity | Component | ProgID | CLSID | |---|---|---| | `Framework/Application.wsc` | `WscMvc.Application` | `{851C7763-1638-42FE-A166-BF3DD3A96A88}` | | `Controllers/HomeController.wsc` | `WscMvc.HomeController` | `{87488446-60BE-4068-8368-0B709BB68F3F}` | CLSIDs are fixed at creation and must never be recycled for a different component (AGENTS.md). ## IIS site (test host: win2025test, 100.127.62.31) - Site: `WscMvc`, binding `*:8090`, physical path `C:\Projects\wsc-mvc`. - App pool: `WscMvc`, 64-bit, no managed code. - `web.config` hides `Framework/`, `Controllers/`, `tests/`, `tools/`, `docs/` (path-segment based, anywhere in the tree) and denies `.wsc/.vbs/.ps1/.md` by extension. - Default document is `Default.asp`; `/hello` is served via a rewrite rule, not the default document. ## Deferred to later milestones (do not implement early) Per SPEC §3 non-goals and IMPLEMENTATION_PLAN M2+: request/response context object, central error mapping, explicit route table, HTML views/templates, ADODB, auth, logging. M1's error handling is intentionally local (`Default.asp` and `Application.wsc` each guard their own `CreateObject`/method-call boundary) rather than centralized.