[0005] (2) The amount of development and maintenance will be huge
For example, when common codes such as new product features and bug fixes are maintained, the maintenance cost of these branch versions will increase exponentially!
[0006] (3) Complicated testing and release
It is inefficient and error-prone to obtain the corresponding branch code, packaging, testing, etc. for different customers.
[0007] According to the customization needs of users in different sub-sectors, there are usually two methods currently adopted, one is branch development, and the other is plug-in mode; the branch development refers to the development of a branch, and carry out customized development on this branch; however, as the number of enterprises increases, the number of branches will gradually increase, which will undoubtedly bring huge overhead costs to later maintenance and upgrades; the plug-in development mainly includes script-based, etc. Dynamic interpretation language and extension based on a specific plug-in interface. The former mainly uses the ability of dynamic interpretation and execution of scripting language. Since the scripting language does not need to be compiled, there is no need to construct types in advance. It only needs to be dynamically interpreted and executed each time it is called. For development It is convenient to adjust the program logic, but the program execution efficiency is poor, and it is almost suitable for scenarios where the expansion requirements are not complicated; the latter supports more complex business logic, and generally writes some components that follow certain rules. Or when executing specific business logic, load the type in the component by static call or reflection, etc. and execute the corresponding code, and pass the address of the exposed extension interface in memory to the component, and the component calls the plug-in interface according to these addresses, so as to realize Enhancements to main program functionality
Plug-in development is a method that is widely used at present, but it is limited to add new functions on the basis of the original service interface and plug-in interface, and cannot change the original functions. It can only be regarded as an add-on
[0008] In order to solve the frequent modification of the program to meet the constantly updated business needs, the patent "plug-in support method based on preloading mechanism" (application number: 201510136737.0) has made a new breakthrough, including the following steps: 1. The main program starts and Load the plug-in running framework, which is responsible for reading the external plug-in; 2. The plug-in running framework starts an independent class loader for the external plug-in, and the class loader loads the type in the plug-in and saves the type in the global cache; 3. Plug-in Run the framework to obtain the current class loader of the main program, replace the parent loader of the current class loader of the main program with the proxy class of the original parent loader, and the proxy class of the original parent loader will intercept all the requests sent to the original class loader Type loading call; 4. When the main program requests to call the Class type, first search for the Class type from the original parent loader according to the type name, if the target type is not found, then match from the global cache to see if there is a corresponding type provided by the plug-in , if the matching is successful, it will be directly loaded and executed, otherwise, an exception will be thrown; however, this patent only uses a supplementary mechanism to meet new needs by continuously adding functions. Although it can cope with customized development, it is not compatible. And the stability of program replacement is not considered comprehensively