- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1
 
Core Concepts
        Michael Wigley edited this page Sep 15, 2025 
        ·
        1 revision
      
    PlugHub isn’t just another plugin framework—it’s a paradigm shift in software development. By marrying rigorous technical foundations with unbounded extensibility, it lets you build applications as composable systems rather than monolithic codebases.
Revolutionary Flexibility, Enterprise-Grade Stability
- Swap storage backends, UI frameworks, or entire workflows by replacing plugins—no refactoring required.
 - Turn a database-driven movie player into a cloud-powered music editor overnight.
 - Build enterprise tools with the agility of hobby projects, all while ensuring versioning, validation, and security.
 
PlugHub uses a service-based coordination model powered by Dependency Injection (DI). Plugins define and consume services through interfaces, enabling loose coupling and modular extensibility.
Key Mechanics
- 
Factory-Driven Instantiation:
- Plugins implement factories to construct services, ViewModels, and components. These factories are called once at startup, giving plugins full control over instantiation without host interference.
 
 - 
Service Provision:
- 
Core Host Services: Logging, configuration, and 
IPluginServiceProviderare provided out-of-the-box. - Plugin Services: Plugins register their own services (e.g., IDatabaseService) with the DI container at startup. After registration, these services are resolved through standard DI for the remainder of the application's lifecycle via IPluginServiceProvider.
 
 - 
Core Host Services: Logging, configuration, and 
 - 
Interface Contracts:
- Plugins distribute interface DLLs as NuGet packages, ensuring compile-time type safety and version control.
 - Conflicts are avoided via 
ConflictsWithmetadata and unique interface naming. 
 - 
Validation First:
- Plugins declare dependencies (e.g., 
DependsOn: PluginA v1.2.0) in metadata. PlugHub blocks invalid combinations at startup. 
 - Plugins declare dependencies (e.g., 
 
Example Workflow
- 
Plugin A defines 
IDatabaseServicein a shared DLL (via NuGet) and implements a factory to create it. - 
Plugin B references the NuGet package and resolves 
IDatabaseServicethrough DI. - Both plugins interact via the interface, with versioning enforced by NuGet.
 
| Abstraction | Purpose | Example Interfaces | 
|---|---|---|
| Plugin | Modular units of functionality. | 
IPlugin (base interface) | 
| Service | Constructs services/components on demand. | IPluginServiceProvider | 
| Page | UI components integrated into the host. | 
IPluginPage, IPluginSettingsPage
 | 
| Metadata | Dependency, conflict, and versioning rules. | 
DependsOn, ConflictsWith
 | 
- 
Zero Boilerplate, Maximum Control:
- Plugins own their factories—create singletons, transients, or custom lifecycles without host constraints.
 
 - 
Your Stack, Your Rules:
- Use Lua for scripting? gRPC for networking? PlugHub doesn’t gatekeep—it adapts to your stack.
 
 - 
Deterministic Stability:
- All plugins initialize once at startup. No runtime reloading. No dangling references.
 
 
RPG Designer leverages PlugHub to create an engine-agnostic toolkit for game data:
- 
Database Plugin: Implements 
IDatabaseServicewith factories for SQLite, JSON, or cloud storage. - 
Dialog Editor Plugin: Resolves 
IDatabaseServiceand provides a factory for its MVVM-driven UI. - 
Branding Plugin: Dynamically themes the app via 
IPluginBrandedfactories. 
Transformative Flexibility
- 
Film Editor: Replace 
IQuestTrackerwithIShotListManagerandIRPGThemewithICinematicTheme. - 
Enterprise Dashboard: Integrate 
IAuthService,IAuditLogger, andICorporateBrandingplugins. - 
Data Analyzer: Add 
IChartingServiceandIBigDataConnectorplugins. 
This is composable software engineering—where applications evolve organically through plugin swaps.
- Escape Boilerplate Hell: No rewriting config systems or UI toolkits. Focus on your features.
 - Own Your Stack: Mix open-source, commercial, or proprietary plugins like Lego blocks.
 - Future-Proof: Replace outdated components without tearing down your codebase.