Skip to content

SAIF.Presentation.Web.MVC operations and processes

This page is the operation catalog and cross-operation hub for this library. Each operation's detailed, step-by-step logic lives in its own page under operations/.

Operation catalog

Operation Intent Trigger Inputs Outputs Rules Tables SQL
Initialize a request Run the fixed per-request lifecycle: timeout handling, security, menu authorization, model init, query string and context processing ViewPageBase.Page_Init after the factory produces the controller HttpContext.Current, session keys navdata, <ViewID>-model, <ViewID>-viewdata Established principal, cached NavigationContext, initialized model, applied query string/context, or a redirect BR-MVC-001, BR-MVC-004, BR-MVC-006, BR-MVC-007, BR-MVC-016 — —
Establish the security principal Establish or reuse the authenticated clsSecurityPrincipal, or challenge/deny the caller Step 4 of Initialize; also callable directly by derived controllers Model.Context.SecurityPrincipal, Request.UserHostAddress Populated Context.SecurityPrincipal, STYPE cookie, or a 401 challenge/thrown exception BR-MVC-004, BR-MVC-005, BR-MVC-014 — —
Enforce menu-based page authorization Deny access to any page not present in the user's authorized menu set Step 6 of Initialize, every request Request.Url.LocalPath, Session("navdata") Continue, or clear navdata and redirect to the login screen BR-MVC-007, BR-MVC-015 — —
Navigate to a view Move the user to another view, in-app or cross-app, persisting context or opening a popup as needed Derived controller decides to leave the current view; also used by ViewPageBase.ProcessError TargetApp, TargetView, popup options, optional new model GUID Context rows saved (cross-app case), __SAIFPID session entry (same-app case), redirect or popup script BR-MVC-008, BR-MVC-009, BR-MVC-010, BR-MVC-011, BR-MVC-012, BR-MVC-013 Context SQL-001
Navigate with a fresh model Construct a brand-new model/view-data pair under a new GUID, then delegate to Navigate Derived controller opens a new logical window/instance under multi-model support SupportsMultiModel, factory-built model, current ViewData New model/view data stored under a new GUID; delegates to Navigate BR-MVC-008, BR-MVC-011 Context SQL-001
Receive inbound cross-application context Retrieve and apply context left by a source application, completing a deferred navigation if present Initialize step 10, when a referrer exists Referrer path, current request path Applied context via HandleContext; possible immediate Navigate BR-MVC-010, BR-MVC-017 Context SQL-002, SQL-003
Load the user's authorized menu Load and cache the user's Oracle-backed menu authorization set for the session First request of a session (step 5 of Initialize) Upper-cased, trimmed user ID MenuAuthorizedItems collection cached in session BR-MVC-006, BR-MVC-015, BR-MVC-018 — —
Retrieve and consume context rows Read and delete a source application's context rows for the current session, consuming the hand-off exactly once Called by CheckContext when the referrer application differs from the current one Source app, current app, session ID Hashtable of context values; source rows deleted BR-MVC-017 Context SQL-002, SQL-004
Persist context rows Replace an application's context rows for a session with the current in-memory context values Called by Navigate on a genuine cross-app transition Application name, session ID, in-memory context hashtable Prior rows deleted, new rows inserted BR-MVC-017, BR-MVC-019 Context SQL-004, SQL-001
Harvest posted control values Walk the page's control tree and collect posted values into a name/value map for the screen's Retrieve Page_Load → CallRetrieve Page control tree Hashtable of control values keyed by control ID BR-MVC-020, BR-MVC-021 — —
Page error processing Classify and route an unhandled page exception, giving the application first refusal Page_Error → ProcessError Unhandled exception Message control text set, navigation to the default view, or delegation to central error handling BR-MVC-022, BR-MVC-023 — —
Central error handling Log and e-mail an error, then redirect to an appropriate error page Delegated from ProcessError or called directly Exception, model, context Logged/e-mailed error, redirect to the error page with an encoded message BR-MVC-012, BR-MVC-024, BR-MVC-025, BR-MVC-026 — —
Restore input focus Re-focus the last bound control on the client after a postback PreRender when a bound control ID is in session Session("focuscontrol"), bound control type name Startup script that restores (and optionally selects) focus BR-MVC-027, BR-MVC-028 — —
Validate and write the model Gate persistence behind validation clsControllerBase.Write / clsModelBase.Write Derived model state WriteData result, or False when validation fails BR-MVC-029 — —

Process flow diagram

The following diagram visualizes the primary operational flow across operations.

flowchart TD
    Start([Browser request]) --> Init[Initialize a request]
    Init --> Sec[Establish security principal]
    Sec --> Menu[Enforce menu-based page authorization]
    Menu --> Decision{Authorized?}
    Decision -->|No| Deny([Redirect to login screen])
    Decision -->|Yes| Model[Model.Pre_Init + Load]
    Model --> Ctx[Receive inbound cross-application context]
    Ctx --> Retrieve[Harvest posted control values]
    Retrieve --> Nav[Navigate to a view]
    Nav --> Persist[Persist context rows]
    Persist --> EndOk([Response rendered / redirected])

Inherited operations and processes

Operations in this section originate from base classes or services provided by dependency framework libraries. They are inherited or delegated, not implemented in this library. This library does not itself derive from clsBusinessBase, but the run's library-density scan surfaced the base class in this library's dependency chain (SAIF.Business.Menu's object model derives from it); the entries below are recorded for cross-layer traceability rather than as operations this library performs.

From clsBusinessBase (SAIF.Framework.Core)

Operation Intent Provided by Origin Embedded in
Business object edit lifecycle Snapshot, restore, and commit in-memory object edits through BeginEdit(), CancelEdit(), and ApplyEdit()† clsBusinessBase SAIF.Framework.Core Not embedded in this library — cross-layer context only; this library defines no BOF business objects*
Business object save lifecycle Persist root or child business objects through the framework Save() and SaveChild() pipeline† clsBusinessBase SAIF.Framework.Core Not embedded in this library — cross-layer context only; this library defines no BOF business objects*

Origin: These operations are defined in SAIF.Framework.Core / clsBusinessBase and are documented here only because SAIF.Business.Menu, a direct dependency of this library, derives from clsBusinessBase. This library's own controller/model classes are not clsBusinessBase-derived business objects and do not call these operations.

Database interactions

The following table summarizes which operations read from or write to the database. Per-step SQL and table citations live in each operation's detail page under operations/.

Operation SQL Tables Type
Navigate to a view SQL-001 Context Write
Navigate with a fresh model SQL-001 Context Write
Receive inbound cross-application context SQL-002, SQL-003 Context Read
Retrieve and consume context rows SQL-002, SQL-004 Context Read/Delete
Persist context rows SQL-004, SQL-001 Context Delete/Write

Failure and edge-case behavior

  • Session timeout on a postback is redirected rather than processed, with the destination depending on whether the caller is on the internal network (BR-MVC-001, BR-MVC-002, BR-MVC-003).
  • An unauthenticated internal caller receives a 401 NTLM/Basic challenge; an unauthenticated external caller receives a thrown exception routed through central error handling (BR-MVC-005).
  • A page not present in the user's authorized menu redirects to the login screen rather than returning a 403 (BR-MVC-007).
  • Navigate2 throws ApplicationException when called without multi-model support enabled (BR-MVC-011).
  • Redirect-induced ThreadAbortExceptions are caught and suppressed throughout the framework so they are never mistaken for application errors (BR-MVC-012).
  • Database timeout and unavailability errors surface a retryable message on the page rather than the generic error page (BR-MVC-023).
  • Focus-restoration script failures are swallowed by a client-side try/catch so they never break page rendering (BR-MVC-028).

Note: Statements marked with † are derived from dependency library documentation via the Legends CLI. Statements marked with * were inferred from code structure or contextual evidence. Statements marked with ** could not be confirmed; treat as unknown until verified.

Sources

  • SAIF.Presentation.Web.MVC/clsControllerBase.vb
  • SAIF.Presentation.Web.MVC/clsContext.vb
  • SAIF.Presentation.Web.MVC/clsModelBase.vb
  • SAIF.Presentation.Web.MVC/NavigationContext.vb
  • SAIF.Presentation.Web.MVC/ViewPageBase.aspx.vb