A method to complete the customized development of business system forms without modifying the code
Through dynamic generation of bytecode and dynamic generation of SQL statements, combined with instrumentation technology and JAVA design model, the customization of business system forms without modifying code is achieved, improving development efficiency and reducing operation and maintenance costs.
Patent Information
- Application Number
- CN202211725216.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-30
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2042-12-30
AI Technical Summary
Existing low-code platforms cannot implement form customization without modifying business system code, resulting in low development efficiency and high operation and maintenance costs.
Bytecode dynamic generation technology, SQL statement dynamic generation technology and instrumentation technology are adopted, combined with JAVA design pattern, form is edited on the page through visual drag and drop operations, and modified elements are stored through the FieldSaver interface. Redis storage and dynamic bytecode programming are used to write the modification to the Class file, and finally load it into the JVM by the Java Agent to dynamically generate SQL statements.
It realizes the customization of forms without modifying business code, improves development efficiency, and reduces development workload and operation and maintenance costs.
Smart Images

Figure CN115878108B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a bytecode dynamic generation technology and an SQL statement dynamic generation technology, in particular to a method for completing customized development of business system forms without modifying codes. Background Art
[0002] Dynamic bytecode generation technology is a technology that modifies the file structure and content of existing JAVA bytecode files to modify the program at the bytecode level, so that the JAVA virtual machine can directly interpret and execute it.
[0003] The instrumentation technology relies on JVMI (a set of native programming interfaces provided by the Java virtual machine for Java virtual machine-related tools) to dynamically modify and operate Java byte files;
[0004] SQL statement dynamic generation technology, based on the MyBatis framework and syntax analysis technology of compilation principles, dynamically edits SQL statements to complete dynamic modification of SQL statements;
[0005] Although the low-code platforms currently on the market can complete form customization, they all generate static code based on the low-code platform, then merge the generated static code into the company's business system, recompile and package the company's system, and then upgrade the existing business system. As a result, it is impossible to achieve the purpose of business form customization and dynamic business changes without modifying the code or redeploying the company's business system. Summary of the Invention
[0006] In response to the problems existing in the prior art, the present invention provides a method for completing customized development of business system forms without modifying the code. It is a technology that can seamlessly customize forms in the original business system without changing any code in the original business system. Only visual dragging operations on the page and then restarting the business system are required to complete form customization, thereby greatly improving development efficiency and quickly meeting user needs.
[0007] The purpose of the present invention is achieved through the following technical solutions.
[0008] A method for completing customized development of business system forms without modifying code, comprising the following steps:
[0009] 1) The user selects the business form to be edited on the visual editing page, edits the form by dragging and dropping visually, and clicks "Save" after editing is complete to proceed to step 2);
[0010] 2) The backend stores the form elements modified in step 1) in Redis storage through the FieldSaver interface, and modifies the database table structure corresponding to the business form, and then executes step 3);
[0011] 3) The user restarts the business system to which the business form belongs, and then executes step 4);
[0012] 4) Operate the customized form page in the business system, click "Save", and then execute steps 5) to 7) at the same time;
[0013] 5) The Java program reads the modified element set of the business form stored in Redis storage and dynamically writes the modified elements into the Class file through dynamic bytecode programming;
[0014] 6) Java Agent loads the modified Class file into JVM;
[0015] 7) The Java program dynamically generates SQL statements based on the data in the new form, saves the data, and then executes step 8);
[0016] 8) Java returns the operation results to the user.
[0017] The FieldSaver interface is defined to store the edited business form element set in Redis and modify the database table structure corresponding to the business form.
[0018] The BeanClassFileTransFormer class is defined to read the modified element set of the business form stored in Redis, and dynamically write the modified business form element set into the Class file through dynamic bytecode programming.
[0019] The BeanAgent class is defined, which is responsible for loading the dynamically modified Class file into the JVM.
[0020] The SqlChangeInterceptor class is defined, which is responsible for dynamically generating SQL statements based on the data in the edited new business form and saving the data.
[0021] Compared with the existing technology, the advantages of the present invention are: the present invention develops Agent components and SQL statement dynamic generation components, and form visual operation components through technical means such as bytecode dynamic generation technology, SQL statement dynamic generation technology, and stub technology, as well as design means such as JAVA design patterns, so there is no need to modify the business code. You only need to visually drag and edit on the page, and then restart the business system.
[0022] When using the solution of the present invention, there is no need to modify the business code. You only need to perform visual operations on the page and then restart the business system. This greatly reduces the development workload, improves development efficiency, reduces development costs, and can also reduce the learning costs of operation and maintenance personnel. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a schematic diagram of the framework of the present invention.
[0024] Figure 2 Flowchart of the present invention. DETAILED DESCRIPTION
[0025] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0026] A method to complete the customized development of business system forms without modifying the code, such as Figure 2 As shown, the steps include:
[0027] 1. The user selects the business form to be edited (e.g., department information) on the visual editing page, and edits the form by dragging and dropping visually (e.g., to add a contact phone number and email address to the department information, on the visual editing page, drag the contact phone number and email address input boxes into the department information form and adjust their positions). After editing, click "Save";
[0028] 2. The backend uses "FieldSaver" to store the form elements modified in step 1 in Redis storage, and modifies the database table structure corresponding to the business form;
[0029] 3. The user restarts the business system to which the business form belongs (for example, the reporting system);
[0030] 4. Operate the customized form page in the business system (for example, add a new department information data, which includes the contact phone number and email information added in step 1), and click "Save";
[0031] 5. The Java program reads the modified element set of the business form stored in Redis and dynamically writes the modified elements into the Class file through dynamic bytecode programming;
[0032] 6. Java Agent loads the modified Class file into JVM;
[0033] 7. The Java program dynamically generates SQL statements based on the data in the new form (the inserted SQL statement includes the contact phone number and email information added in step 1) and saves the data;
[0034] 8. Java returns the operation results to the user.
[0035] Steps 5, 6, and 7 are all triggered after clicking "Save" in step 4.
[0036] like Figure 1 As shown, the FieldSaver interface is defined to store the edited business form element set in Redis and modify the database table structure corresponding to the business form;
[0037] The BeanClassFileTransFormer class is defined to read the modified element set of the business form stored in Redis and dynamically write the modified business form element set into the Class file through dynamic bytecode programming.
[0038] The BeanAgent class is defined, which is responsible for loading the dynamically modified Class file into the JVM;
[0039] The SqlChangeInterceptor class is defined, which is responsible for dynamically generating SQL statements based on the data in the edited new business form and saving the data.
Claims
1. A method for completing customized development of business system forms without modifying the code, characterized by The steps include: 1) The user selects the business form to be edited on the visual editing page, edits the form by dragging and dropping, and clicks "Save" after editing is complete, then proceeds to step 2); 2) The backend stores the form elements modified in step 1) in Redis storage through the FieldSaver interface, and modifies the database table structure corresponding to the business form, and then executes step 3); 3) The user restarts the business system to which the business form belongs, and then executes step 4); 4) In the business system, operate the customized form page, click "Save", and then execute steps 5) to 7) simultaneously; 5) The Java program reads the modified element set of the business form stored in Redis storage and dynamically writes the modified elements into the Class file through dynamic bytecode programming; 6) Java Agent loads the modified Class file into JVM; 7) The Java program dynamically generates SQL statements based on the data in the new form, saves the data, and then executes step 8); 8) Java returns the operation results to the user.
2. A method for completing customized development of business system forms without modifying code according to claim 1, characterized in that The FieldSaver interface is defined to store the edited business form element set in Redis and modify the database table structure corresponding to the business form.
3. A method for completing customized development of business system forms without modifying code according to claim 1, characterized in that The BeanClassFileTransFormer class is defined to read the modified element set of the business form stored in Redis, and dynamically write the modified business form element set into the Class file through dynamic bytecode programming.
4. A method for completing customized development of business system forms without modifying code according to claim 1, characterized in that The BeanAgent class is defined, which is responsible for loading the dynamically modified Class file into the JVM.
5. The method for completing customized development of business system forms without modifying code according to claim 1 is characterized in that The SqlChangeInterceptor class is defined, which is responsible for dynamically generating SQL statements based on the data in the edited new business form and saving the data.
Citation Information
Patent Citations
WEB-based online form development tool
CN102360296A
Configurable form runtime customization method, equipment and medium
CN113569550A