Skip to content

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.

Technical Foundations

Orchestration Model

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 IPluginServiceProvider are 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.
  • Interface Contracts:
    • Plugins distribute interface DLLs as NuGet packages, ensuring compile-time type safety and version control.
    • Conflicts are avoided via ConflictsWith metadata and unique interface naming.
  • Validation First:
    • Plugins declare dependencies (e.g., DependsOn: PluginA v1.2.0) in metadata. PlugHub blocks invalid combinations at startup.

Example Workflow

  1. Plugin A defines IDatabaseService in a shared DLL (via NuGet) and implements a factory to create it.
  2. Plugin B references the NuGet package and resolves IDatabaseService through DI.
  3. Both plugins interact via the interface, with versioning enforced by NuGet.

Architectural Pillars

Key Abstractions

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

Design Principles

  • 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.

From Vision to Reality

Real-World Impact: RPG Designer & Beyond

RPG Designer leverages PlugHub to create an engine-agnostic toolkit for game data:

  • Database Plugin: Implements IDatabaseService with factories for SQLite, JSON, or cloud storage.
  • Dialog Editor Plugin: Resolves IDatabaseService and provides a factory for its MVVM-driven UI.
  • Branding Plugin: Dynamically themes the app via IPluginBranded factories.

Transformative Flexibility

  • Film Editor: Replace IQuestTracker with IShotListManager and IRPGTheme with ICinematicTheme.
  • Enterprise Dashboard: Integrate IAuthService, IAuditLogger, and ICorporateBranding plugins.
  • Data Analyzer: Add IChartingService and IBigDataConnector plugins.

This is composable software engineering—where applications evolve organically through plugin swaps.

Why Developers Choose PlugHub

  • 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.
Clone this wiki locally