SAIF.Presentation overview¶
Documentation context: Packaged Component (NuGet)
SAIF.Presentation is a small VB.NET class library whose entire compiled surface is the clsPreferences user-preference store and its PrefScope enumeration. It wraps the SAIF.Framework.Preferences package with an application/page/web scope model and persists preferences as JSON through the SAIF BOF Oracle data layer.
Purpose¶
- Provide a per-user, per-application preference store that consuming presentation components use to remember UI state (for example, saved Infragistics grid column order, widths, sort order, and size) across requests.
- Load all of a user's stored preferences eagerly on construction, expose scoped indexed read/write access at application, page, or web scope, and persist mutations back through
SAIF.Framework.Preferences.PreferenceDatawhenSave()is called. - Consumed as a leaf dependency by
SAIF.Presentation.Web.Core.Infragistics111andSAIF.Presentation.Web.Controls.V2.Menu, both of which read and mutate preferences throughclsPreferencesrather than accessing the underlying framework preference service directly.
Responsibilities¶
- Own the
PrefScopescope model (AppLevel,PageLevel,WebLevel) and the key-normalization rules (lower-casing) applied to every keyed operation. - Derive the effective page name for page-scoped preferences, distinguishing web callers (from
HttpContext.Current.Request.Path) from non-web callers (viaOverridePageor a reflected call-stack type name). - Serialize in-memory preference items to JSON and hand them to the framework preference service for persistence; this library issues no SQL of its own.
Key components¶
clsPreferences: the sole public type. Loads a user's preferences on construction, exposesItem,Add,Remove,Clear,Delete,Count, andOverridePage, and persists changes viaSave().PrefScope: a pure enumeration (AppLevel,PageLevel,WebLevel) with no behavior of its own; it parameterizes every lookup and mutator onclsPreferences.
Related documentation¶
- Index
- Architecture
- Dependencies
- Operations and processes
- Business rules
- Database tables
- SQL catalog
- API reference
Sources¶
SAIF.Presentation/clsPreferences.vbSAIF.Presentation/SAIF.Presentation.vbproj