Architecture Diagram¶
Architecture Diagram¶
The ConproSoft solution follows a three-tier web architecture, mediated entirely by the Metadata driven controller framework. Click the diagram to zoom and view details.
%%{init: {'theme':'base', 'themeVariables': { 'fontSize':'16px'}}}%%
flowchart LR
subgraph Client[" "]
direction TB
Browser["🌐 <b>Browser / Client</b><br/><br/>TouchUI SPA<br/>JavaScript/CSS<br/>AJAX/JSON requests"]
end
subgraph IIS["🖥️ Web Server - IIS / Windows Server"]
direction TB
subgraph Pres["<b>PRESENTATION LAYER</b>"]
direction LR
Entry["<b>Site.aspx</b><br/>Entry Point<br/>SiteBase Handler"]
Pages["<b>Pages</b><br/>/pages/*.html<br/>Page Definitions"]
Login["<b>Login.html</b><br/>Authentication<br/>Entry Point"]
Assets["<b>Static Assets</b><br/>/js, /css<br/>/fonts, /images<br/>touch-settings.json"]
end
subgraph App["<b>APPLICATION LAYER</b><br/>(Metadata-driven Framework)"]
direction LR
XML["<b>Controller XML</b><br/>/controllers/*.xml<br/>━━━━━━━━━━━<br/>• SQL commands<br/>• Fields/validation<br/>• Views/actions<br/>• Email rules"]
Rules["<b>Business Rules</b><br/>/App_Code/Rules/<br/>━━━━━━━━━━━<br/>• Generated.cs<br/>• [RowBuilder]<br/>• [ControllerAction]"]
Custom["<b>Custom Rules</b><br/>/custom/Rules/<br/>━━━━━━━━━━━<br/>• SharedBusinessRules<br/>• Override files<br/>• Multi-tenancy"]
Svc["<b>Services</b><br/>/Services/<br/>━━━━━━━━━━━<br/>• ApplicationServices<br/>• DataController<br/>• REST (inactive)"]
Hand["<b>Handlers</b><br/>/Handlers/<br/>━━━━━━━━━━━<br/>• Blob.ashx<br/>• Report.ashx<br/>• Export/Import"]
Sec["<b>Security</b><br/>/Security/<br/>━━━━━━━━━━━<br/>• Membership<br/>• Auth Module<br/>• Event Tracker"]
end
subgraph DAL["<b>DATA ACCESS LAYER</b>"]
direction LR
Data["<b>ADO.NET Abstraction</b><br/>/App_Code/Data/<br/>━━━━━━━━━━━<br/>• SqlText<br/>• DataAccess.cs<br/>• MyCompany connection"]
end
end
subgraph External[" "]
direction TB
DB["🗄️ <b>SQL Server</b><br/><br/>conprosoft_tenant<br/>Tables/Views/SPs<br/>aspnet_* Membership<br/>Errors log<br/>UserPictures BLOB"]
FS["💾 <b>File System</b><br/><br/>~\\App_Data\\<br/>Documents<br/>Certificates<br/>Attachments<br/>Images"]
SMTP["📧 <b>SMTP Relay</b><br/><br/>smtp.bulkmail-<br/>vendor.com:25<br/>From: conprosoft.co.za"]
end
%% Main flow connections
Browser -->|"HTTPS<br/>Page Requests"| Entry
Entry --> Pages
Entry --> Assets
Browser -->|"AJAX<br/>JSON"| Svc
%% Application layer flow
Svc --> XML
XML --> Rules
Rules --> Custom
%% Service interactions
Browser -->|"File<br/>Operations"| Hand
Browser -->|"Reports"| Hand
Hand -.->|"File Storage"| FS
Hand -.->|"User Pics"| DB
%% Data access
Svc --> Data
Data -->|"TCP/SQL"| DB
%% Authentication
Login --> Sec
Sec --> DB
%% Email
Custom -.->|"Email<br/>Triggers"| SMTP
%% Styling
classDef clientStyle fill:#FFF9C4,stroke:#F57F17,stroke-width:3px,color:#000
classDef serverStyle fill:#E3F2FD,stroke:#1565C0,stroke-width:2px
classDef layerStyle fill:#E1F5FE,stroke:#01579B,stroke-width:2px
classDef externalStyle fill:#FFE0B2,stroke:#E65100,stroke-width:2px,color:#000
class Browser,Client clientStyle
class IIS,Pres,App,DAL serverStyle
class Entry,Pages,Login,Assets,XML,Rules,Custom,Svc,Hand,Sec,Data layerStyle
class DB,FS,SMTP,External externalStyle
Component Responsibilities¶
Presentation Layer¶
Site.aspx/SiteBase: the single ASP.NET entry point for all page requests. Reads the requested/pages/*.htmlfile, injects the TouchUI JavaScript/CSS shell, and returns the full SPA to the browser./pages/*.html: one file per screen. Each contains<div>elements withdata-controller,data-view, and related attributes that tell the TouchUI which controller and view to render.Login.html: the authentication entry point.touch-settings.json: configures the UI: app name (ConproSoft), TouchUI mode, 2FA settings, REST API key, and PWA manifest.
Application Layer (Metadata driven controller)¶
- Controller XML: the heart of the application. Every screen, field, action, and validation rule is defined here as XML metadata.
- Business Rules: C# partial classes placed in
App_Code/Rules/. They use attribute-based hooks to inject logic at specific points in the controller lifecycle. - Custom Overrides: hand-written C# in
App_Code/custom/Rules/. These are the only files a developer should modify manually in normal operation. - Services: application bootstrap (
ApplicationServices), the AJAX data endpoint (DataControllerService), and the REST engine (present but not operationally active). - HTTP Handlers: handle BLOB file operations, report rendering, data export, and data import via dedicated
.ashxendpoints.
Data Access Layer¶
- Provides an ADO.NET abstraction (
SqlText,DataAccess) used by both the framework and custom business rules. - The
MyCompanyconnection string inweb.configis the single point of database configuration.
Database¶
- SQL Server hosts all application data, ASP.NET membership tables, and BLOB-stored attachments.
- All BLOB data (documents, certificates, images, attachments) is stored in the filesystem via registered BLOB adapters in the
~\App_Data\folder. Only user profile pictures (UserPictures) are stored in SQL Server BLOB columns.
SMTP¶
- All outbound email is sent via the configured SMTP relay.
- Email rules are defined directly in the controller XML files and fired after specific actions (Insert/Update) on relevant controllers.
1. Presentation Layer¶
- ASP.NET Web Forms (
Site.aspx,Login.html, content pages in/pagesand/Views) - Touch UI frontend (configured via
touch-settings.json) - Client-side resources (JavaScript in
/js, CSS in/css, fonts and images in/fontsand/images)
2. Application Layer¶
- Generated pipeline for controllers and views
- Controller metadata in
/app/controllers(*.xml,*.model.xml) - Business rules and overrides in
/app/App_Code/custom/Rules - Application services and REST endpoints in
/app/App_Code/Services - Security and membership integration in
/app/App_Code/Security
3. Data Layer¶
- SQL Server database accessed via the
MyCompanyconnection string defined inweb.config - Data access abstractions and infrastructure under
/app/App_Code/Data - BLOB storage implemented through BLOB adapters (configured in
web.configappSettings), storing attachments either in the database or filesystem paths.
Physical View (Textual)¶
Web Server¶
- IIS Website/Application: hosting the
/appfolder as the root of the application. - Application Pool: running .NET Framework 4.8 in Integrated pipeline mode.
Database Server¶
- SQL Server instance (local or remote) accessible from the web server.
- Database schema supporting the controllers (tables, views, procedures).
Mail Server / SMTP Relay¶
- SMTP endpoint configured under
<system.net><mailSettings>inweb.config. - Used by email business rules and membership notifications.