SAIF.Framework.Core overview¶
Documentation context: Framework Documented via: Primary/root project for the repository-wide
SAIF.BOF.FrameworkNuGet package (SAIF.Framework.Core\SAIF.BOF.Framework.Core.nuspec)
SAIF.Framework.Core is the foundational Business Object Framework (BOF) layer of the repository. It defines the abstract contracts and base implementations that all domain-specific business-object libraries inherit from (clsBusinessBase, clsBusinessCollectionBase(Of ItemType), IBusinessCriteria), the data-access plumbing (IDataPortalInfo, IDataAccess, Oracle/SQL Server data layers), and cross-cutting concerns such as the business rules engine, smart value types, property tracking, and XML/report building. Two generations of several subsystems — the business rules engine and smart value types — coexist side by side in the same assembly under V1\ and V2\ folders/namespaces.
Purpose¶
- Provide the shared abstract base classes, interfaces, and data-access plumbing that every domain-specific business-object library in the repository builds on, so that business logic, undo/edit semantics, and database access are implemented consistently across the framework.
- Consumed by every downstream SAIF business-object library in the repository as a project reference and/or via the packaged
SAIF.BOF.FrameworkNuGet package; it is the primary/root project for that package.
Responsibilities¶
- Provide the abstract business-object base classes (
clsBusinessBase,clsBusinessCollectionBase) that all domain business objects in the repository inherit from, including n-level undo (BeginEdit/CancelEdit/ApplyEdit), object linking (ILinkItem), and collection traversal (ITraversion). - Provide a parallel REST/API-oriented business-object model (
clsBusinessApiBase,clsBusinessCollectionApiBase,clsBusinessApiCriteriaBase) built onRestSharp, for business objects backed by web APIs rather than direct SQL. - Abstract database access behind
IDataPortalInfo/IDataAccessso business objects are decoupled from the concrete Oracle or SQL Server driver in use (IDataLayer, implemented byclsMSOracleDataLayerandclsSQLDataLayer). - Host the business rules engine (
clsRulesManagerin V1,RuleManagerin V2) that stores and invokes rule-handler delegates and tracks broken-rule results. - Supply DB-null-safe "smart value" property wrapper types (
clsSmartString/clsSmartDate/clsSmartDecimalin V1;SmartString/SmartDate/SmartDecimal/SmartIntegerin V2) used throughout BOF business objects. - Supply supporting cross-cutting infrastructure: property-change tracking (
TrackedProperty/TrackedProperties,TrackedApiProperty/TrackedApiProperties), code-table/lookup abstractions (clsCodeTableBase,clsCodeCollection), validation helpers (clsValidation,clsCharacterAnalyzer), XML/report building (clsReportSpecification,clsReportXMLBuilder,SAIFXDocument), and environment/preference utilities (clsProperties,SAIFEnvironment,Preference/PreferenceData).
Key components¶
clsBusinessBase/clsBusinessCollectionBase(Of ItemType): the classic SQL-oriented business-object hierarchy; every domain business object in the repository ultimately derives from these.clsBusinessApiBase/clsBusinessCollectionApiBase/clsBusinessApiCriteriaBase: the parallel REST/API-oriented business-object hierarchy, built onRestSharp.IDataPortalInfo/clsDataPortalInfo: the central "DPI" object passed to every business object, abstracting database and API access.IDataLayer,clsSQLDataLayer, and the Oracle equivalent: driver-specific implementations of the data-access abstraction.clsRulesManager(V1) /RuleManager(V2): the business rules engine that stores rule-handler delegates and tracks broken-rule results.- Smart value types (
clsSmartString,clsSmartDate,clsSmartDecimalin V1;SmartString,SmartDate,SmartDecimal,SmartIntegerin V2): DB-null-safe property wrappers.
Related documentation¶
Sources¶
SAIF.Framework.Core\SAIF.BOF.Framework.Core.vbprojSAIF.Framework.Core\SAIF.BOF.Framework.Core.nuspecSAIF.Framework.Core\V1\BaseItems\clsBusinessBase.vbSAIF.Framework.Core\V1\BaseItems\clsBusinessCollectionBase.vbSAIF.Framework.Core\V1\Api\clsBusinessApiBase.vbSAIF.Framework.Core\V1\DataAccessLayer\clsDataPortalInfo.vbSAIF.Framework.Core\V1\BusinessRules\clsRulesManager.vbSAIF.Framework.Core\V2\BusinessRules\(RuleManager and related types)Pipelines\build-vars.yml