SAIF.Presentation.Web.Binding.Infragistics103 architecture¶
SAIF.Presentation.Web.Binding.Infragistics103 is a pure presentation-tier UI-binding library ("ObjectBinder") that connects SAIF business objects to ASP.NET WebForms controls, including both classic (v10.3 "NetAdvantage classic") and modern Infragistics control families. It performs no database access and enforces no business rules of its own; it delegates validation to the bound business object's IDataErrorInfo/IsValid implementation and surfaces the result as control-level formatting and aggregated error messages.
Responsibilities¶
- Register and coordinate per-control data bindings between ASP.NET/Infragistics WebForms controls and SAIF business-object properties, via
clsObjectBindManageracting as a page-levelSystem.Web.UI.Controlfacade/mediator. - Push business-object property values into bound controls (object → control) and pull control values back into business-object properties (control → object), using reflection-based property get/set defined in the shared base class
clsObjectBinderBase. - Aggregate and surface validation errors from bound business objects (via
IDataErrorInfo/IsValid) as CSS error/valid formatting on controls and as consolidated error text (optionalErrorLabel/SAIFMessagedisplay). - Support supplemental validation scenarios that are not simple property-to-control bindings: custom validators (
clsCustomValidator, property/method/object modes) and dual binders where the displayed value and the validated value come from different object/property pairs (AddDualBinder). - Provide typed argument bags (
clsObjectBindingArgsand its nested argument classes) that carry control-family-specific binding options (padding, grid keys, mask/numeric/date-editor options) into theAdd()overload family.
Component boundaries¶
clsObjectBindManager(root orchestrator): owns theArrayListof active binder instances (m_Bindings), exposes the ~90 overloadedAdd()methods (one family per control type),DataBind(),BindToObject(),Validate(),RefreshValidation(),AddCustomValidator(),AddDualBinder(), and grid/DDLUpdate()helpers. It is the only type a consuming ASPX page interacts with directly.clsObjectBinderBase(shared binder contract/services):MustInheritroot of the binder hierarchy defining the abstract contract (Init(),ObjectToControl(),ControlToObject()) every concrete binder implements, plus shared reflection-based property access, error-state CSS formatting (SetControlFormat),IDataErrorInfoerror harvesting (GetErrors), and SAIF-framework-object detection (IsSAIFFrameWorkObject).clsObjectBindingArgs(argument surface): strongly-typed argument bag and nested/related argument classes (CheckBoxBindingArgs,PadArgs,HierarchialGridArgs,UltraGridBindingArgs,WebDataGridBindingArgs,WebHierarchicalDataGridBindingArgs,SAIFMaskEditBindingArgs/WebMaskEditBindingArgs,WebDateTimeEditBindingArgs,WebNumericEditBindingArgs) that parameterizeAdd()overloads.clsCustomValidator: a non-control-bound validator supporting Property/Method/Object validation modes via delegate properties, registered through the sameAddBinder()path as control binders.ASPControls\(stock ASP.NET WebControls binder family):clsCheckBoxBinder,clsCheckBoxListBinder,clsDataListBinder,clsDDLBinder,clsHyperLinkBinder,clsLabelBinder,clsRadioButtonBinder,clsTextBoxBinder— each adapts a standardSystem.Web.UI.WebControlstype to theclsObjectBinderBasecontract.InfragisticsControls\(modern InfragisticsInfragistics.Web.UIfamily):clsSAIFWebMaskEditorBinder,clsWebDataGridBinder,clsWebDatePickerBinder,clsWebDateTimeEditorBinder,clsWebHierarchicalDataGridBinder,clsWebMaskEditorBinder,clsWebNumericEditorBinder,clsWebTextEditorBinder.InfragisticsClassicControls\(classic "10.3 NetAdvantage" family):clsSAIFWebMaskEditBinder,clsUltraGridBinder,clsWebComboBinder,clsWebDateChooserBinder,clsWebDateTimeEditBinder,clsWebHtmlEditorBinder,clsWebMaskEditBinder,clsWebNumericEditBinder,clsWebTextEditBinder.Enums.vb(shared vocabulary): public enums/delegates (ObjectDataType,PadDirection,PadTarget,ControlBindProperty,NumericControlProperty,CustomValidationType,BindTypes,CustomBindingControls, and thePropertyValidator/MethodValidator/CustomValidatordelegates) used across all binder families.- Root-level orphaned duplicates: a parallel set of root-level
.vbfiles with the same class names as theASPControls\/InfragisticsControls\/InfragisticsClassicControls\binders exist on disk but are excluded from the.vbprojCompile Includelist; they are stale, unbuilt copies* and are not part of the compiled component boundary, even though the.nuspecpackages them as source (see Dependencies).
Interaction model¶
- A consuming ASPX page instantiates
clsObjectBindManageras a server control and calls one of theAdd()overloads per control/business-object property to register a binding; each call constructs the matching concrete binder, setsFormControl(triggeringProcessControl), setsBindType/UseEvents, callsInit()(wiring native control change events whenUseEventsis true), and registers the binder via the privateAddBinder()helper, which also keys the bound object intom_ValidationObjects(aHybridDictionary) usingValidationKey. DataBind()(an override ofControl.DataBind, also invoked automatically fromOnPreRenderwhenAutoBind = True) iterates all registered binders and callsObjectToControl()on any binder whoseBindTypeisObjectToControlorTwoWay, pushing business-object property values into controls.BindToObject()iterates binders whose controls are not event-driven (or all binders, ifinAllControls:=True) and callsControlToObject()forControlToObject/TwoWaybinders, pulling control values back into business-object properties with binder-specific type coercion (e.g.,clsDDLBinder.ControlToObjectswitches onObjectDataType).Validate()/RefreshValidation()first callBindToObject()to sync non-event-driven controls, optionally re-checkIsValidon distinct bound objects, then iterate binders callingPerformValidation()(custom validators) orGetErrors()(standard binders readingIDataErrorInfo.Item(property)), aggregating unique error messages, tracking the first control in error, applying CSS formatting viaSetControlFormat, and writing consolidated error text to an optionalErrorLabeland/orSAIFMessagecontrol.AddDualBinder()supports binding a control's displayed value to one object/property while validating against a different object/property pair, for a fixed set of control kinds (CustomBindingControls).Update(UltraWebGrid|WebDataGrid|DropDownList, dataSource)locates an existing matching binder by controlUniqueID, updates itsBindSource, and re-invokesObjectToControl()to refresh the control after the underlying collection changes; this re-registers the binder viaAddBinder(), which appends rather than replaces the entry inm_Bindings*.- The library's only coupling to
SAIF.BOF.Frameworkis reflection/string-based:IsSAIFFrameWorkObjectwalks the CLR base-type chain for the literal names"clsBusinessCollectionBase"/"clsBusinessBase", and the validation key is derived from the object'sMyGuidproperty (via reflection) when recognized, or the uppercased type name otherwise.
Architecture diagram¶
The following diagram shows the high-level component interactions between a consuming page, the binder manager, concrete binders, and bound business objects.
flowchart TD
Page["Consuming ASPX page"] --> Manager["clsObjectBindManager<br>(facade/mediator)"]
Manager --> Base["clsObjectBinderBase<br>(shared binder contract)"]
Base --> ASP["ASPControls binders<br>(TextBox, DDL, CheckBox, CheckBoxList, DataList, HyperLink, Label, RadioButton)"]
Base --> Modern["InfragisticsControls binders<br>(WebDataGrid, WebDatePicker, WebDateTimeEditor, WebMaskEditor, WebNumericEditor, WebTextEditor, WebHierarchicalDataGrid)"]
Base --> Classic["InfragisticsClassicControls binders<br>(UltraWebGrid, WebCombo, WebDateChooser, WebDateTimeEdit, WebHtmlEditor, WebMaskEdit, WebNumericEdit, WebTextEdit)"]
Base --> Validator["clsCustomValidator"]
Manager --> BizObj["SAIF business object<br>(clsBusinessBase / clsBusinessCollectionBase)*"]
Base --> BizObj
Manager --> ErrorUI["ErrorLabel / SAIFMessage control*"]
Sequence diagram¶
The following diagram shows the primary object-to-control data push and validation sequence.
sequenceDiagram
participant Page as ASPX page
participant Manager as clsObjectBindManager
participant Binder as Concrete binder
participant Obj as SAIF business object
Page->>Manager: Add(control, object, keyProperty, [args], bindType)
Manager->>Binder: New binder, Init(), AddBinder()
Page->>Manager: DataBind()
Manager->>Binder: ObjectToControl()
Binder->>Obj: GetObjectValue(AsString)
Obj-->>Binder: property value
Binder-->>Manager: control updated
Page->>Manager: Validate()
Manager->>Binder: BindToObject(), GetErrors()
Binder->>Obj: IDataErrorInfo.Item(property)
Obj-->>Binder: error text
Binder-->>Manager: aggregated errors, CSS formatting
Manager-->>Page: IsValid / error state
Design constraints¶
- No database access and no independent business-rule evaluation: all rule outcomes originate in bound
SAIF.BOF.Frameworkbusiness objects and are only surfaced, not computed, here. - Two Infragistics control-library generations must be supported side by side (
InfragisticsClassicControls\for v10.3 "classic" controls vs.InfragisticsControls\for the modernInfragistics.Web.UIfamily), doubling the binder surface for grid/editor control types. - SAIF-framework-object detection is a string/reflection-based check on the CLR base-type chain (
"clsBusinessCollectionBase"/"clsBusinessBase") rather than a compiled type reference, coupling correctness to type-name stability inSAIF.BOF.Framework. - The
.vbprojCompile Includelist is the authoritative definition of the built surface; a full parallel set of root-level duplicate binder.vbfiles exists on disk but is excluded from compilation, is textually different (7–10 lines) from the built subfolder versions, and is nonetheless packaged as source into the NuGet package by the repository's.nuspecrecursive glob — a known discrepancy between packaged source and built binary content*. - Resolution of the modern
Infragistics.Web.UI.GridControls/Infragistics.Web.UI.EditorControlsnamespaces at build time is not confirmed from this library's own project references and is presumed to occur transitively through theSAIF.Presentation.Web.Controls.V2project reference.** Update()'s append-rather-than-replace behavior inm_Bindingswhen re-registering a binder for a changed data source may produce duplicate binder entries; this appears to be an unverified latent behavior rather than a confirmed intentional design choice.*
Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts. Statements marked with ** could not be confirmed; treat as unknown until verified.
Related documentation¶
Sources¶
SAIF.Presentation.Web.Binding.Infragistics103\SAIF.Presentation.Web.Binding.Infragistics103.vbprojSAIF.Presentation.Web.Binding.Infragistics103\clsObjectBindManager.vbSAIF.Presentation.Web.Binding.Infragistics103\clsObjectBinderbase.vbSAIF.Presentation.Web.Binding.Infragistics103\clsObjectBindingArgs.vbSAIF.Presentation.Web.Binding.Infragistics103\clsCustomValidator.vbSAIF.Presentation.Web.Binding.Infragistics103\Enums.vbSAIF.Presentation.Web.Binding.Infragistics103\ASPControls\clsTextBoxBinder.vbSAIF.Presentation.Web.Binding.Infragistics103\ASPControls\clsDDLBinder.vbSAIF.Presentation.Web.Binding.Infragistics103\ASPControls\clsCheckBoxListBinder.vbSAIF.Presentation.Web.Binding.Infragistics103\InfragisticsClassicControls\clsUltraGridBinder.vbSAIF.Presentation.Web.Binding.Infragistics103\InfragisticsClassicControls\clsSAIFWebMaskEditBinder.vbSAIF.BOF.Presentation.Web.Infragistics103.nuspec