SAL.Flatbed
1.2.12
dotnet add package SAL.Flatbed --version 1.2.12
NuGet\Install-Package SAL.Flatbed -Version 1.2.12
<PackageReference Include="SAL.Flatbed" Version="1.2.12" />
<PackageVersion Include="SAL.Flatbed" Version="1.2.12" />
<PackageReference Include="SAL.Flatbed" />
paket add SAL.Flatbed --version 1.2.12
#r "nuget: SAL.Flatbed, 1.2.12"
#:package SAL.Flatbed@1.2.12
#addin nuget:?package=SAL.Flatbed&version=1.2.12
#tool nuget:?package=SAL.Flatbed&version=1.2.12
SAL (Software Abstraction Layer)
Overview
SAL is a plugin-based architecture for building modular .NET applications, originally developed in 2009. The system provides a flexible foundation for creating extensible applications with centralized configuration management and role-based feature availability.
Key Features
Centralized Settings Management
- Configurable settings storage with default file system provider
- Extensible through custom
ISettingsProviderimplementations - Role-based access control for settings
Dynamic Module Loading
- Plugin-based architecture for extensible functionality
- Default loading from application directory
- Customizable through
IPluginProviderinterface - Support for runtime module updates
Flexible UI Integration
- Multiple interface paradigms (SDI/MDI/Dialog)
- Support for WinForms UserControls (including WPF)
- Visual Studio IDE integration capabilities
- Automatic UI state persistence
Cross-Platform Architecture
- Core functionality usable in WinForms, WPF, ASP.NET, Windows Services etc.
- Shared plugin ecosystem across different application types
- Support for system services like autorun, single instance, timers
Architecture Overview
Component Hierarchy
Application Layer
- Supports multiple hosts (See below): MDI, Dialog-based, EnvDTE, Windows Service, ASP.NET
SAL Host
- Manages plugin communication and lifecycle
- Handles plugin loading and initialization
Plugins
- Platform-agnostic design
- Inter-plugin communication support
- Host-independent operation
Plugin System
The architecture is built around plugins implementing the IPlugin interface, with key characteristics:
- Modular dependency management
- Runtime plugin updates without recompilation
- No manual binding redirect configuration needed
- State persistence between sessions
Core Components
SAL.Flatbed.dll
- Core assembly containing base interfaces
- Minimal plugin implementation requirements
SAL.Windows.dll
- WinForms-specific components
- Extended UI functionality
- Reusable hosts:
- MDI Applications
- Dialog-based Applications
- Visual Studio Integration (EnvDTE)
Implementation Details
Plugin Initialization Process
Provider Loading
- Loads and configures settings providers (
ISettingsProvider) - Initializes plugin providers (
IPluginProvider)
- Loads and configures settings providers (
Kernel Plugin Detection (optional)
- Identifies and initializes kernel plugins (
IPluginKernel) - Establishes BLL/DAL foundations
- Identifies and initializes kernel plugins (
Plugin Initialization
- Resolves plugin dependencies
- Establishes inter-plugin communications
Plugin Integration Examples
Basic Plugin Structure
public class MyPlugin : IPlugin
{
private readonly IHost _host;
public MyPlugin(IHost host)
=> this._host = host;//Optional constructor
public Boolean OnConnection(ConnectMode mode)
=> return true;
public Boolean OnDisconnection(DisconnectMode mode)
=> return true;
}
Settings Management
public class Plugin : IPlugin, IPluginSettings<PluginSettings>
{
private PluginSettings _settings;
public PluginSettings Settings
{
get
{
if(_settings == null)
{
_settings = new PluginSettings(this);
Host.Plugins.Settings(this).LoadAssemblyParameters(_settings);
}
return _settings;
}
}
Object IPluginSettings.Settings { get { return Settings; } }
}
Data Persistence
// Loading data
using(Stream stream = Plugin.Host.Plugins.Settings(Plugin).LoadAssemblyBlob("DataSet.xml"))
if(stream != null)
DataSet.ReadXml(stream);
// Saving data
using(MemoryStream stream = new MemoryStream())
{
DataSet.WriteXml(stream);
Plugin.Host.Plugins.Settings(this).SaveAssemblyBlob("DataSet.xml", stream);
}
Platform Support
- .NET Framework 2.0
- .NET Standard 2.0
Contributing
Contributions are welcome. Please ensure your changes maintain compatibility with the supported .NET versions.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net20 is compatible. net35 was computed. net40 was computed. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 2.0
- No dependencies.
-
.NETStandard 2.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on SAL.Flatbed:
| Package | Downloads |
|---|---|
|
ZU.Core.Developer
Zet Universe Development Platform |
|
|
SAL.Windows
Software abstraction layer core API. SAL Interface for Windows application. |
GitHub repositories
This package is not used by any popular GitHub repositories.