SAIF.Application.LogView architecture¶
SAIF.Application.LogView is a self-contained BOF logging library built around two business-object pairs: one pair for application errors and one pair for application info or audit records. Its architecture centers on BOF factory and retrieve lifecycles, inline SQL criteria objects, collection queries that pair a capped row-set query with a count query for paging, and a small enum surface declared at namespace scope.
Responsibilities¶
- Persist application error events to
App_Error. - Persist application info or audit events to
App_Info. - Expose collection retrieval paths that assemble SQL filtering and ordering dynamically.
- Translate caller-supplied free-text search strings into SQL Server full-text predicates.
Component boundaries¶
clsAppErrorandclsAppError.Criteria: single-row BOF object and single-object criteria type forApp_Errorinserts, retrieval, and deleted-flag updates.clsAppErrorCollectionandclsAppErrorCollection.Criteria: collection object and collection criteria type for filteredApp_Errorsearches.clsAppInfoandclsAppInfo.Criteria: single-row BOF object and single-object criteria type forApp_Infoinserts and retrieval.clsAppInfoCollectionandclsAppInfoCollection.Criteria: collection object and collection criteria type for filteredApp_Infosearches, including a built-inEPAYandDirectDepositexclusion.TIMEUNITS,COMPARISONS, andSTATISTICFIELDS: standalone public enums declared inclsResources.vb.SearchTypes: standalone public enum declared inclsAppInfoCollection.vbforApp_Infosearch targeting.modLogViewExtensions: non-public helper module that supplies the string helpers used by search parsing.
Interaction model¶
- Callers create new log entries by invoking
CreateNewAppError(...)orCreateNewAppInfo(...), which populate BOF objects and executeInsertSQLduring the save lifecycle. - After each insert, the library executes
Select @@IDENTITYto populateAppErrorSeqNumorAppInfoSeqNumon the saved object. - Collection retrievals execute two queries per request: a
TOP 300row query and a matchingCOUNT(*)query for total-row reporting. - Search criteria objects add predicates only for populated filters, translate semicolon-delimited filters into
IN (...)clauses, and normalizeSearchTextintoCONTAINS(...)expressions.
Architecture diagram¶
The following diagram shows the high-level interactions between callers, BOF business objects, and the two SQL Server tables used by the library.
flowchart TD
A[Calling application or framework logger] --> B[clsAppError / clsAppInfo]
A --> C[clsAppErrorCollection / clsAppInfoCollection]
B --> D[Criteria objects]
C --> D
D --> E[(App_Error)]
D --> F[(App_Info)]
Sequence diagram¶
The following diagram shows the primary filtered-search sequence used by the collection objects.
sequenceDiagram
participant Caller
participant Collection as Collection object
participant Criteria as Criteria
participant DB as SQL Server
Caller->>Collection: GetAppErrorCollection(...) or GetAppInfoCollection(...)
Collection->>Criteria: BuildWhere(), BuildOrder(), GetSearchValue()
Criteria->>DB: RetrieveSQL (TOP 300 rows)
Criteria->>DB: RetrieveSQLCount (matching count)
DB-->>Collection: Row set + total count
Collection-->>Caller: Loaded collection and paging count
Design constraints¶
- The library has no in-repository project references; all framework behavior comes from packaged dependencies.
- Collection result sets are hard-capped at 300 rows, so callers must use the parallel count query for the full match total.
clsAppError.Criteria.DeleteSQLreturns a single-space placeholder instead of executable delete SQL.clsAppError.Criteria.UpdateSQLcontains a trailing comma beforeWHERE, making the text invalid as written.App.configregistersOracle.ManagedDataAccess, but the library's executable SQL uses SQL Server constructs such as@@IDENTITY,TOP 300, andCONTAINS(...).
Related documentation¶
- Index
- Overview
- Dependencies
- Operations and processes
- Business rules
- Database tables
- SQL catalog
- API reference
Sources¶
Application\SAIF.Application.LogView\clsAppError.vbApplication\SAIF.Application.LogView\clsAppErrorCollection.vbApplication\SAIF.Application.LogView\clsAppInfo.vbApplication\SAIF.Application.LogView\clsAppInfoCollection.vbApplication\SAIF.Application.LogView\clsResources.vbApplication\SAIF.Application.LogView\modLogViewExtensions.vbApplication\SAIF.Application.LogView\SAIF.BOF.Application.LogView.vbprojApplication\SAIF.Application.LogView\App.config