Plug-in Loading via Module Packager Reference Conversion
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current applications can only load plug-ins that use function modules defined during the plug-in development process, limiting the extensibility of plug-ins.
Innovation Solution
A plug-in loading method that converts references to target function modules not belonging to the plug-in into references usable by the application's module packager, allowing the plug-in to be loaded normally.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If plug-ins are restricted to use only function modules defined during their development, then the reliability and stability of the system are maintained, but the adaptability and extensibility of the application are limited
Solution Approach 1:
The patent introduces a module packager as an intermediary component that mediates between plug-ins and function modules. The packager converts references from plug-ins to function modules, enabling plug-ins to access function modules outside their original scope without directly exposing the complexity of reference management to plug-in developers. This intermediary layer handles the complexity internally while presenting a simplified interface to users.
Solution Approach 2:
The system is segmented into distinct components: plug-ins, module packager, and function modules. The module packager is separated as an independent component that handles reference conversion, allowing the plug-in system to maintain simplicity while enabling extended functionality. This segmentation isolates the complexity of reference management to a specific component rather than distributing it throughout the entire system.
2Adaptability or versatility
If plug-ins can reference any function module outside their development scope, then the adaptability and functionality are enhanced, but the risk of incorrect references and system instability increases
Solution Approach 1:
The module packager acts as a trusted intermediary that validates and converts references before they are resolved. It ensures that plug-in references to function modules are correct and appropriate, preventing incorrect references while still allowing extended functionality. The packager maintains reliability by controlling the reference resolution process rather than allowing direct, unvalidated access.
Solution Approach 2:
The system implements feedback mechanisms where the module packager monitors and validates reference usage. When a plug-in references a function module, the packager verifies the reference and provides feedback on whether it is appropriate and correct. This feedback loop ensures system stability while enabling extended functionality through proper reference validation.
Data Source
AI summary
Embodiments of the present disclosure relate to the technical field of computers, and provide a plug-in loading method and device. The method includes: receiving a first operation for a target application, the first operation being configured to trigger the target application to load a first plug-in; determining whether the first plug-in is written in a preset language; determining whether the first plug-in references a function module that does not belong to the first plug-in in response to the first plug-in being written in the preset language; in response to a target function module that does not belong to the first plug-in is referenced by the first plug-in, generating a second plug-in by converting a reference to the target function module by the first plug-in to a reference to the target function module by a module packager of the target application; and loading the second plug-in through the target application.


