---
title: SAIF.Framework.Core overview
summary: High-level purpose, scope, and responsibilities for this library.
status: draft
owner: <owner>
last_reviewed: 2026-07-23
library: SAIF.Framework.Core
reference_type: package
---

# SAIF.Framework.Core overview

> **Documentation context:** Framework
> **Documented via:** Primary/root project for the repository-wide `SAIF.BOF.Framework` NuGet 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.Framework` NuGet 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 on `RestSharp`, for business objects backed by web APIs rather than direct SQL.
- Abstract database access behind `IDataPortalInfo`/`IDataAccess` so business objects are decoupled from the concrete Oracle or SQL Server driver in use (`IDataLayer`, implemented by `clsMSOracleDataLayer` and `clsSQLDataLayer`).
- Host the business rules engine (`clsRulesManager` in V1, `RuleManager` in V2) that stores and invokes rule-handler delegates and tracks broken-rule results.
- Supply DB-null-safe "smart value" property wrapper types (`clsSmartString`/`clsSmartDate`/`clsSmartDecimal` in V1; `SmartString`/`SmartDate`/`SmartDecimal`/`SmartInteger` in 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 on `RestSharp`.
- `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`, `clsSmartDecimal` in V1; `SmartString`, `SmartDate`, `SmartDecimal`, `SmartInteger` in V2): DB-null-safe property wrappers.

## Related documentation
- [Index](index.md)
- [Architecture](architecture.md)
- [Dependencies](dependencies.md)
- [Operations and processes](operations-processes.md)
- [Business rules](business-rules.md)
- [Configuration](configuration.md)
- [API reference](api/index.md)

## Sources
- `SAIF.Framework.Core\SAIF.BOF.Framework.Core.vbproj`
- `SAIF.Framework.Core\SAIF.BOF.Framework.Core.nuspec`
- `SAIF.Framework.Core\V1\BaseItems\clsBusinessBase.vb`
- `SAIF.Framework.Core\V1\BaseItems\clsBusinessCollectionBase.vb`
- `SAIF.Framework.Core\V1\Api\clsBusinessApiBase.vb`
- `SAIF.Framework.Core\V1\DataAccessLayer\clsDataPortalInfo.vb`
- `SAIF.Framework.Core\V1\BusinessRules\clsRulesManager.vb`
- `SAIF.Framework.Core\V2\BusinessRules\` (RuleManager and related types)
- `Pipelines\build-vars.yml`
