Form page dynamic rendering method, system, memory and storage medium
Building forms through structured configuration and tree structure, combined with the three-layer architecture of front-end-application server-business server, solves the problems of form design complexity and low rendering efficiency in the existing technology, and achieves efficient and flexible dynamic rendering of forms. and interaction, improving user experience and maintenance convenience.
Patent Information
- Application Number
- CN202410750971.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-06-12
AI Technical Summary
Existing form design technology in manufacturing ERP systems has problems such as high operating costs, complex maintenance, difficulty in responding to demand changes and redundant operations. Moreover, form rendering technology cannot flexibly adapt to different devices and content volumes, resulting in low user interaction efficiency.
It uses structured configuration and tree structure to build forms, supports absolute and relative positioning rendering, and is based on the three-layer architecture of front-end-application server-business server to achieve dynamic rendering and interaction, reduce server requests, and support business logic changes without modifying the interaction logic.
It improves development and maintenance efficiency, reduces costs, enhances user experience and form flexibility, and adapts to complex business scenarios and the processing of large amounts of information.
Smart Images

Figure CN118350356B
Abstract
Description
Technical Field
[0001] The present application belongs to the field of web page data technology, and in particular, relates to a form page dynamic rendering method, system, memory and storage medium. Background Art
[0002] When it comes to form rendering technology for web applications, various form interactions are applied in complex scenarios, especially in manufacturing enterprise resource planning ERP (Enterprise Resource Planning) systems.
[0003] The form technology for processing form data, from the entire development to the front-end application, includes form design, form rendering, form interaction, etc. At present, there are different technical defects in each stage of the entire form process.
[0004] For example, existing form design mainly adopts two methods: using code to write form pages and using visual graphic tools to drag and configure to generate forms. However, the former method using code has high operation and maintenance costs, requires the participation of professionals, and is difficult to make timely and convenient adjustments to changes in requirements, affecting the delivery and use of software projects. The latter uses visual tools to drag and drop to generate forms, which usually does not require professional programmers, but the operation volume is large, and the maintenance of thousands of forms in systems such as manufacturing ERP will generate a lot of repeated and redundant operations.
[0005] In summary, there is an urgent need for a form rendering technology for the Web that can solve the above problems.
[0006] The above statements are only used to provide background technical information related to the present application. Unless otherwise stated herein, the contents described in this section are not prior art for the contents of other parts of the present application. Summary of the invention
[0007] The present invention proposes a method, system, memory and storage medium for dynamic rendering of a form page. During the development stage, the present invention uses structured configuration, and developers can use a tree structure to quickly complete the structure construction of the form.
[0008] This application involves innovation in the entire stage from form development to application, which can solve the defects and problems of the above-mentioned existing form design technologies to a certain extent, realize high interactivity and high efficiency of dynamic form rendering, and greatly improve the convenience and usage experience of developers, maintenance personnel and front-end users.
[0009] First, through structured configuration, developers can use the tree structure to quickly complete the form structure. Compared with the existing technology, this application does not need to do cumbersome visual drag and drop. By using domain definition attributes and original attribute migration, the attributes and configuration information in the form field can be quickly assigned to the new form, which reduces the cost of development and maintenance over time.
[0010] Secondly, this application is based on structured form configuration, and the form actually supports two different rendering positioning methods, namely absolute positioning and relative positioning. Compared with the prior art, the front-end program of this application will choose to use absolute positioning or relative positioning according to the properties and structure of the form at runtime and according to the needs of the scene, which can be very flexibly compatible with different display devices and forms with different content volumes.
[0011] Furthermore, the entire form design phase of this application is based on a three-tier architecture of front-end-application server-business server. Different from the traditional cs architecture and bs architecture, this application redefines the entire development to application path of the form, so that the form is stored in the database during development, and in actual use after release, it provides runtime usage capabilities based on the database of the business server, the application storage of the application server, and the cache of the front-end browser. When users use the form, the form can reduce the pressure of requests to the server through caching, and can also change the changes in form information caused by business information when business information changes, thereby achieving complete and dynamic rendering. In most cases, the form configuration and interaction logic programs do not need to be modified to cope with business changes, thereby reducing development and maintenance costs.
[0012] Finally, this application is based on a three-tier architecture of front-end-application server-business server. During the interaction between the user and the form, the front-end continuously sends a small amount of input information generated by the user multiple times, and the application server makes judgments based on the logic of the program, and directly feeds back the determined results to the front-end, so that the user can get appropriate and timely prompts during the use of the form; it enables complex and large-volume business forms in the manufacturing ERP application scenario to be processed efficiently and stably, while also improving the user experience.
[0013] Therefore, according to a first aspect of an embodiment of the present application, a form page dynamic rendering method is provided, which is applied to an application server, and the application server is connected to a business server and a front end; the rendering method includes:
[0014] In the development phase, the designer accesses the form design page, introduces form fields or creates form fields, and displays the form fields in a tree structure on the design page; makes structural adjustments and designs form controls; saves the form to store the form data in the development database on the application server, and enters the form conversion runtime phase;
[0015] During the form conversion runtime, the interactive script is adjusted to realize the interaction between the application server and the business server and the front end; during the form conversion runtime, the form data saved in the development phase is compiled into form definition information that is directly read-only loaded by the application server and form information that is read by the business server;
[0016] In the dynamic interaction stage, the input information of the front-end user interaction is received to make information judgment and send feedback information.
[0017] In some implementations of the present application, form fields are introduced or customized based on domains, including:
[0018] Select existing fields in forms of other templates, search and select multiple fields through the tree structure menu, and substitute the confirmed fields into the current form design page;
[0019] Or by providing a field description and selecting the field domain type, match the fields in the corresponding domain. If a match is found, the field information and properties are returned; if no match is found, a new field is created based on the characteristics of the domain.
[0020] In some embodiments of the present application, structural adjustment includes dragging fields in any node to sort, dragging fields in any node to determine parent and child, adding nodes to the tree structure to create a group, and deleting nodes in the tree structure;
[0021] Make structural adjustments to design form controls, including:
[0022] Attach the introduced fields to the root node in a tree structure;
[0023] Structural adjustment of tree structures, including: using absolutely positioned fields to generate certain two-dimensional logical coordinates through tree structure management, clearly defining the relationship between fields, assigning two-dimensional logical coordinate data according to a configurable metadata dictionary and storing it in the development database; attaching any field to a collection to form a field group, performing batch processing, control positioning and style management between groups through the attributes of the field group; and controlling the function of any field by adjusting and configuring the attributes of the field.
[0024] In some implementations of the present application, in the dynamic interaction stage, receiving input information during front-end user interaction to perform information judgment includes:
[0025] Receive input information from front-end users and corresponding valid events;
[0026] Determine the interaction information of valid events based on the form definition information and the interaction script, and provide operation feedback, message prompts, and error reports based on the interaction information.
[0027] In some implementations of the present application, operation feedback, message prompts, and error reporting are performed according to the interactive information, including:
[0028] Valid events include adding, deleting, modifying, and querying business information. The application server sends the form values or fields of the addition, deletion, modification, and query to the business server.
[0029] Receive the execution results, error messages or prompts from the business server and provide feedback to the front-end user.
[0030] According to a second aspect of an embodiment of the present application, a method for dynamically rendering a form page is provided, which is applied to a front end, the front end is connected to an application server, and the application server is also connected to a business server; the rendering method includes:
[0031] In the form rendering stage, the front-end user accesses the form interface and receives the form definition information in the file parsed by the application server; the positioning method is determined according to the form rendering environment and the form definition information, and the form controls are rendered according to the positioning method; the business data requested by the application server to the business server is received and the form data is filled in; after the form rendering and loading are completed, the dynamic interaction stage is entered. In the dynamic interaction stage, the input information of the front-end user is sent to the application server, and the feedback information from the application server is received.
[0032] According to a third aspect of an embodiment of the present application, a method for dynamic rendering of a form page is provided, which is applied to a business server, the business server is connected to an application server, and the application server is also connected to a front end; the rendering method includes:
[0033] In the dynamic interaction stage, the business server receives the form values or fields sent by the application server for addition, deletion, modification and query, and enters the business logic processing flow;
[0034] If the data is valid and meets the business judgment, the business database of the business server is accessed to perform addition, deletion, modification and query operations, and the execution results are returned to the application server at the same time;
[0035] If the data is erroneous or invalid, an error or prompt message will be returned to the application server.
[0036] According to a fourth aspect of an embodiment of the present application, a form page dynamic rendering system is provided, including an application server, a business server and a front end, wherein the application server is connected to the business server and the front end;
[0037] Application server: during the development phase, designers access the form design page, introduce form fields or create form fields, and display the form fields in a tree structure on the design page; make structural adjustments and design form controls; save the form and store the form data in the development database of the application server, and enter the form conversion runtime phase;
[0038] The application server is used to adjust the interactive script to realize the interaction between the application server and the business server and the front end during the form conversion runtime. During the form conversion runtime, the form data saved in the development phase is compiled into form definition information that is directly read-only loaded by the application server and form information that is read by the business server.
[0039] The application server is used to receive input information from front-end users during dynamic interaction, make information judgments, and send feedback information;
[0040] The business server is used to receive the form values or fields sent by the application server for addition, deletion, modification and query during the dynamic interaction stage, and the business server enters the processing flow of the business logic;
[0041] If the data is valid and meets the business judgment, the business database of the business server is accessed to perform addition, deletion, modification and query operations, and the execution results are returned to the application server at the same time;
[0042] If the data is wrong or invalid, an error or prompt message will be returned to the application server;
[0043] The front end is used for the front-end user to access the form interface during the form rendering stage, and receive the form definition information in the file parsed by the application server; determine the positioning method according to the form rendering environment and the form definition information, and render the form controls according to the positioning method; receive the business data requested by the application server to the business server and fill in the form data; enter the dynamic interaction stage after the form rendering and loading are completed. In the dynamic interaction stage, the front-end user's input information is sent to the application server, and the feedback information from the application server is received.
[0044] According to a fifth aspect of an embodiment of the present application, a memory is provided, comprising: a storage unit for storing executable instructions; and a processing unit for connecting to the memory to execute the executable instructions to complete a method for dynamic rendering of a form page.
[0045] According to a sixth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored; the computer program is executed by a processor to implement a method for dynamic rendering of a form page.
[0046] The form page dynamic rendering method, system, memory and storage medium of the present application are applied to the application server, and the rendering method includes: in the development stage, the designer accesses the form design page, introduces form fields or creates form fields, and displays the form fields in a tree structure on the design page; makes structural adjustments and designs form controls; saves the form to store the form data in the development database of the application server, and enters the form conversion runtime stage; in the form conversion runtime stage, adjusts the interactive script to realize the interaction between the application server and the business server and the front end; through the form conversion runtime, compiles the form data saved in the development stage into form definition information that is directly loaded by the application server in a read-only manner and form information read by the business server; in the dynamic interaction stage, receives the input information during the front-end user interaction to make information judgments, and sends feedback information. In the development stage of the present application, through structured configuration, developers can use the tree structure to quickly complete the structure construction of the form.
[0047] This application involves innovation in the entire stage from form development to application, which can solve the defects and problems of the above-mentioned existing form design technologies to a certain extent, realize high interactivity and high efficiency of dynamic form rendering, and greatly improve the convenience and usage experience of developers, maintenance personnel and front-end users. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0049] Figure 1 A schematic diagram of the steps of a method for dynamic rendering of a form page according to an embodiment of the present application is shown in FIG.
[0050] Figure 2 A schematic diagram of the steps of the second method for dynamic rendering of a form page according to an embodiment of the present application is shown in FIG.
[0051] Figure 3 A schematic diagram of steps of a third method for dynamic rendering of a form page according to an embodiment of the present application is shown in FIG.
[0052] Figure 4 A schematic diagram of the process of the form design and development stage according to an embodiment of the present application is shown in FIG.
[0053] Figure 5 A schematic diagram of structural adjustment in the form design development phase according to an embodiment of the present application is shown in FIG.
[0054] Figure 6 A schematic diagram of a structured design creation group according to an embodiment of the present application is shown in FIG.
[0055] Figure 7 A schematic diagram of editing field properties during form design and development according to an embodiment of the present application is shown in FIG.
[0056] Figure 8 A schematic diagram of the process of using a form according to an embodiment of the present application is shown in FIG.
[0057] Fig. 9 A schematic diagram of the dynamic interaction process in the form use phase according to an embodiment of the present application is shown in FIG.
[0058] Fig.10 A structural schematic diagram of a form page dynamic rendering system according to an embodiment of the present application is shown in FIG.
[0059] Fig.11 A schematic diagram of the structure of a memory according to an embodiment of the present application is shown in FIG. DETAILED DESCRIPTION
[0060] Regarding this application, considering the existing form technologies for processing form data from the entire development to the front-end application, including form design, form rendering, form interaction, etc., there are different technical defects in each stage of the entire form process.
[0061] 1) Existing form designs are mainly designed in two ways: 1. Form pages written in code, 2. Forms generated by dragging and configuring using visual graphic tools. However, the former uses code, which has high operation and maintenance costs and requires the participation of professionals. It is also difficult to make timely and convenient adjustments to changes in requirements, affecting the delivery and use of software projects. The latter uses visual tools to drag and drop to generate forms, which usually does not require professional programmers, but the operation volume is large, and the maintenance of thousands of forms in systems such as manufacturing ERP will generate a lot of repeated and redundant operations.
[0062] For example, the prior art uses a drag-and-drop method to visually place controls in divided areas. Although this method avoids the need for designers to use code for maintenance, it still brings about large development and maintenance costs when facing complex manufacturing business scenarios and their thousands of forms. Moreover, this method still cannot avoid the problem of repeated modifications. When the business scenario changes, the pre-conceived form control interaction method needs to be changed, and it needs to be redesigned and reapplied. Moreover, this design is relatively rigid when facing users and cannot be flexibly adjusted according to the current stage of business progress.
[0063] 2) Existing web form rendering technologies can be divided into two directions: browser-side rendering technology CSR (Client-Side Rendering) and server-side rendering technology SSR (Server-Side Rendering). Browser-side rendering is that the browser-side program requests and loads all required resources and data, then parses, processes the data, and finally puts the processed data into the generated visual control so that users can see the form content. However, the former relies on the computing resources of the client, which will occupy the performance of the user's computer, and can only rely on the logic and configuration of the front-end to make rendering choices. Once changes occur during business operation, the information in the form cannot complete business verification in time, and errors or conflicts may occur when the user submits, thereby affecting the efficient development of the business. The latter server-side rendering technology usually assigns the work of data parsing and processing to the server. After the user clicks on the page, the server starts to calculate and prepare the data, and then sends the processed data to the browser-side program in turn, and finally puts the data into the generated visual control. However, server-side rendering means that all controls, configuration information, and state changes on the page need to be controlled by the server. However, when many users are using complex forms to process business, it will cause server-side resource shortages or even crashes due to high occupancy, thus affecting the smooth operation of the business.
[0064] For example, the configuration of fields in the prior art, and then judging the properties of the components during front-end rendering and then selectively rendering different fields, still belongs to the front-end rendering method, because the fields that can be used currently depend on the pre-configured cache, rather than the back-end data and back-end business logic that are run and calculated in real time. Therefore, it is still easy to have limitations in business implementation, requiring developers to do a lot of configuration in advance, and once the configuration changes, a lot of maintenance needs to be done, and the workload of development for different scenarios will increase exponentially.
[0065] 3) There are two main ways to position existing form components when rendering an interface: absolute positioning and relative positioning. Most software can only choose one of these methods, which means accepting all its defects. Absolute positioning is very accurate, and a certain position coordinate is given during design. However, when the browser window size, zoom, or window ratio changes, the rendered controls cannot be recalculated and can only be covered or squeezed, resulting in an inconsistent interface and inconvenient viewing and use. In addition, since absolute positioning searches for controls at a given position to fill in data, the positional relationship between controls will change when the controls are displayed and switched in different states, which requires adding complex processing logic to deal with this situation. Relative positioning can easily handle the positional relationship between controls and backgrounds, and between controls, but relative positioning makes it difficult to create a sophisticated interface. When there are many controls in the interface, if different control groups need to present different effects, very complex logic needs to be added to handle different controls, such as which control should be how far away from which control, etc.
[0066] 4) In addition, most of the existing dynamic forms cannot complete the dynamic interaction process with users well, especially in web application scenarios. Many forms can only be handed over to the server to determine whether the business logic and data are correct when the user clicks OK and submits. The process of users filling out forms may be very long. Once there is a problem with the submission, it may cause work interruption. It is necessary to find the error in the form and try again and again. The problems caused by this interaction greatly reduce the convenience of user operation. Especially for the scenario where dozens of fields of information need to be submitted at a time, the efficiency of application use is reduced, resulting in the inability to transmit business information in a timely manner, and even serious consequences such as data inconsistency due to the submission of wrong data.
[0067] For example, the so-called visual design form in the prior art stores the configuration information in the form data of the database, reads it from the database during rendering, and dynamically changes the logical configuration of the field when the user inputs. Although this method can change according to different usage scenarios, it cannot closely fit the current business logic because this judgment is not based on the judgment made by the business logic module running in real time.
[0068] For another example, the prior art refers to rendering based on the options to be rendered from preset options and determining the content to be rendered based on the user's scrolling operation. Although it can avoid rendering a part that does not meet the conditions, it is limited by the preset configuration. In complex business scenarios, controls that do not need to be rendered and filled with data will actually change. This change is not predictable by the form designer, but depends on the business logic.
[0069] In response to the above technical problems, this application involves innovation in the entire stage from form development to application, which can solve the defects and problems of the above existing form design technologies to a certain extent, achieve high interactivity and high efficiency of dynamic form rendering, and greatly improve the convenience and usage experience of developers, maintenance personnel and front-end users.
[0070] First of all, through structured configuration, developers can use tree structure to quickly complete the form structure construction. Compared with the prior art, this application does not need to do cumbersome visual dragging. By using domain definition attributes and original attribute migration, the attributes and configuration information in the form field can be quickly assigned to the new form, so that the cost of development and maintenance continues to decrease over time. It is even possible to directly complete the development of a new form in a few short steps; and when the business scenario changes, or when the underlying data attributes are modified, since the data of the form comes from inheritance or migration, when its parent is adjusted, the corresponding changes will quickly cover all objects that need to be changed after compilation; and for the interactive logic of a form, the interactive logic can be supplemented and customized through an appropriate amount of code on the standard template to achieve precise and efficient fit to the business form requirements, thereby better improving business operation efficiency.
[0071] Secondly, this application is based on structured form configuration, and the form actually supports two different rendering positioning methods, namely absolute positioning and relative positioning. Compared with the prior art, the front-end program of this application will choose to use absolute positioning or relative positioning according to the properties and structure of the form at runtime and according to the needs of the scene, which can be very flexibly compatible with different display devices and forms with different content volumes.
[0072] Furthermore, the entire form design phase of this application is based on a three-tier architecture of front-end-application server-business server. Different from the traditional cs architecture and bs architecture, this application redefines the entire development to application path of the form, so that the form is stored in the database during development, and in actual use after release, it provides runtime usage capabilities based on the database of the business server, the application storage of the application server, and the cache of the front-end browser. When users use the form, the form can reduce the pressure of requests to the server through caching, and can also change the changes in form information caused by business information when business information changes, thereby achieving complete and dynamic rendering. In most cases, the form configuration and interaction logic programs do not need to be modified to cope with business changes, thereby reducing development and maintenance costs.
[0073] Finally, this application is based on the three-tier architecture of front-end-application server-business server. In the interaction between users and forms, the front-end continuously sends a small amount of input information generated by users multiple times, and the application server judges based on the logic of the program, and directly feeds back the determined results to the front-end, so that users can get appropriate and timely prompts during the use of the form; making it possible to efficiently and stably process complex and large-volume business forms in the manufacturing ERP application scenario, while also improving the user's experience. For the information request business server that needs to be judged, such as the addition, deletion, modification and query of business data, the business server returns the latest business information generated according to the current business status changes, which is returned to the front-end after being parsed by the application server. In this process, the front-end does not need to care about the business logic, and the application server does not need to care about the business logic. Instead, it serves the front-end through the parsing of configuration information and interactive programs, while the business server only considers the processing of business logic. The three perform their respective duties, making it possible to efficiently and stably process complex and large-volume business forms in the manufacturing ERP application scenario, while also improving the user's experience, and avoiding small mistakes that users are prone to make when filling out forms, which easily lead to data asynchrony.
[0074] In summary, the form page dynamic rendering method, system, memory and storage medium of the present application, when applied to the application server, the rendering method includes: in the development stage, the designer accesses the form design page, introduces form fields or creates form fields, and displays the form fields in a tree structure on the design page; makes structural adjustments and designs form controls; saves the form to store the form data in the development database of the application server, and enters the form conversion runtime stage; in the form conversion runtime stage, adjusts the interaction script to realize the interaction between the application server and the business server and the front end; through the form conversion runtime, compiles the form data saved in the development stage into form definition information that is directly loaded read-only by the application server and form information read by the business server; in the dynamic interaction stage, receives the input information during the front-end user interaction to make information judgment, and sends feedback information.
[0075] This application uses structured configuration during the development phase, and developers can use the tree structure to quickly complete the form structure construction.
[0076] In order to make the technical solutions and advantages in the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0077] Example 1
[0078] According to a first aspect of an embodiment of the present application, a method for dynamic rendering of a form page is provided, which is applied to an application server, and the application server is connected to a business server and a front end.
[0079] Figure 1 A schematic diagram of the steps of a first method for dynamic rendering of a form page according to an embodiment of the present application is shown in FIG.
[0080] like Figure 1 As shown, the form page dynamic rendering method of the embodiment of the present application includes the following steps:
[0081] S1: During the development phase, the designer accesses the form design page, introduces form fields or creates form fields, and displays the form fields in a tree structure on the design page; makes structural adjustments and designs form controls; saves the form to store the form data in the development database on the application server, and enters the form conversion runtime phase.
[0082] S2: During the form conversion runtime, the interactive script is adjusted to realize the interaction between the application server and the business server and the front end; during the form conversion runtime, the form data saved in the development phase is compiled into form definition information that is directly read-only loaded by the application server and form information that is read by the business server;
[0083] S3: In the dynamic interaction stage, the input information of the front-end user interaction is received to make information judgment and send feedback information.
[0084] In the preferred implementation, during the S1 development phase, the introduction of form fields or domain-based customization specifically includes:
[0085] Select existing fields in forms of other templates, search and select multiple fields through the tree structure menu, and substitute the determined fields into the current form design page; or provide a field description and select the field type, match the fields in the corresponding domain, if a match is found, return the field information and properties; if no match is found, create a new field based on the characteristics of the domain.
[0086] Structural adjustments include dragging fields in any node to sort, dragging fields in any node to determine parent and child, adding nodes to the tree structure to create groups, and deleting nodes in the tree structure.
[0087] In the preferred implementation, in the S1 development stage, structural adjustment and design of form controls are performed, including:
[0088] First, the introduced fields are attached to the root node in a tree structure; then, the tree structure is structurally adjusted, including: using absolutely positioned fields to generate certain two-dimensional logical coordinates through tree structure management, clearly defining the relationship between fields, assigning two-dimensional logical coordinate data according to a configurable metadata dictionary and storing it in the development database; attaching any field to a set to form a field group, and performing batch processing, control positioning and style management between groups through the attributes of the field group; and controlling the function of any field by adjusting and configuring the attributes of the field.
[0089] In the preferred implementation, in the S3 dynamic interaction stage, receiving the input information during the front-end user interaction and performing information judgment specifically includes:
[0090] First, receive the input information of the front-end user and the corresponding valid events; then, determine the interactive information of the valid events according to the form definition information and the interactive script, and provide operation feedback, message prompts and errors according to the interactive information.
[0091] Among them, the operation feedback, message prompts and error reporting based on the interactive information specifically include:
[0092] Among them, valid events include adding, deleting, modifying and checking business information.
[0093] First, the application server sends the form values or fields to be added, deleted, modified, or checked to the business server.
[0094] Then, receive the execution results, error or prompt information from the business server and feed it back to the front-end user.
[0095] This application involves innovation in the entire stage from form development to application, which can solve the defects and problems of the above-mentioned existing form design technologies to a certain extent, realize high interactivity and high efficiency of dynamic form rendering, and greatly improve the convenience and usage experience of developers, maintenance personnel and front-end users.
[0096] Figure 2 A schematic diagram of the steps of the second method for dynamic rendering of a form page according to an embodiment of the present application is shown in FIG.
[0097] like Figure 2 As shown, the second method of dynamic rendering of the form page is applied to the front end; the front end is connected to the application server, and the application server is also connected to the business server. The rendering method includes:
[0098] S101: In the form rendering stage, the front-end user accesses the form interface and receives the form definition information in the file parsed by the application server; determines the positioning method according to the form rendering environment and the form definition information, and renders the form controls according to the positioning method; receives the business data requested by the application server to the business server and fills in the form data; enters the dynamic interaction stage after the form rendering and loading are completed.
[0099] S102: In the dynamic interaction stage, the input information of the front-end user is sent to the application server, and the feedback information of the application server is received.
[0100] Figure 3 A schematic diagram of the steps of method three for dynamic rendering of a form page according to an embodiment of the present application is shown in FIG.
[0101] like Figure 3 As shown, the third method of dynamic rendering of the form page is applied to the business server, which is connected to the application server, and the application server is also connected to the front end. The rendering method includes:
[0102] S201: In the dynamic interaction stage, the business server receives the form value or field for addition, deletion, modification and query sent by the application server, and enters the processing flow of the business logic;
[0103] S202: If the data is valid and meets the business judgment, access the business database of the business server to perform addition, deletion, modification and query operations, and return the execution results to the application server at the same time;
[0104] S203: If the data is erroneous or invalid, an error message or prompt information is returned to the application server.
[0105] This application involves innovation in all stages from form development to application. The following further describes the improvements in each stage of this application.
[0106] 1. First, in the development stage, after the form object is created, the form data is stored in the development database of the application server, which is isolated from the production database of the business server.
[0107] 2. During the development phase, the standard properties of the fields are inherited from the domain definition by default. A domain is a collection used to describe a type of data. Conceptually, it is similar to metadata. Field properties inherited from a domain can change based on changes in the domain. After a domain changes, you can use a script to batch update all or part of the associated fields so that their properties remain consistent with the domain.
[0108] 3. During the development phase, it supports parsing and introducing field data from the original form: after creating a form object with the form design tool, the user can retrieve the form they want to reference in the design tool. The system analyzes the fields of each historical version of the form in the database through the field parser, and extracts the original field information of the form, deduplicates, merges, and verifies the data, and provides the filtered data to the user for selection. The field object selected by the user will be associated with the new form, and no duplicate field data will be generated in the database; the introduced data will be sorted according to its field type, name, length, and business logic, and the field arrangement will be automatically optimized while retaining the original form order, and a new field position relationship will be generated based on the analysis of the field type under the original absolute coordinates.
[0109] 4. During the development phase, this application manages and arranges fields through a two-dimensional tree structure to form logical coordinates.
[0110] After the fields are introduced, they will be attached to the root node in a tree structure (the form name is the only unchanging parent and is marked as the root node). At this time, the user can flexibly adjust the tree structure generated by the system, including (moving the field level up and down, moving the field order up and down), and can reinsert or reference new fields at any node at any time to achieve incremental maintenance.
[0111] The arranged fields will generate two-dimensional logical coordinates when the user submits and saves them. The fields that originally used absolute positioning will generate certain new logical coordinates through tree structure management. The relationship between the fields is also clearly defined. The coordinate data is assigned according to the configurable metadata dictionary and stored in the database.
[0112] Using group objects to arrange fields: In addition to managing field data, this invention also introduces an abstract concept of "group". Group means that users can attach any field to a collection. In this collection, users can batch process the attributes of the fields. They can also use the attributes of the "group" to position controls and manage styles between groups. For example, special titles can be given to groups to distinguish them from ordinary control titles, helping users quickly locate information blocks on the form.
[0113] Control field rendering through field properties: Before generating a structured form, users can also adjust and configure the properties of any field to control the function of the field, such as (source domain, whether to force input, alignment dependent objects, associated jump objects, field normal / inverted color, maximum and minimum input / display length, height, whether to display field information in the control, field label information, help information)
[0114] 5. Develop form programs: The form program is developed based on the fourth-generation programming language. You can get started by mastering the basic programming principles. Developers can choose to use the standard preset form program, or develop and adjust the form program by themselves. The main function of the form program is to execute control and process the user's io information by the application server, define how to respond and prompt for a certain input from the user, and under what circumstances to access the business server for synchronization and request it to process business data; based on the developed form program, the front end can be completely separated from the judgment of business logic, and is only responsible for the transmission of user input information and the display of visual elements.
[0115] 6. Convert form data to data dictionary: When the user completes form editing, the system does not directly generate the form to the user interface, but goes through a version control and conversion process from static to runtime. Through this process, each generated form is assigned a traceable version number and its data is converted to the data dictionary. At this time, the data will be allowed to be read when the system service is running; when the form needs to be updated or modified, the user can modify and save the static data without affecting the form running in the production environment.
[0116] 7. Application server parses form data and field attributes: The form metadata converted into the data dictionary will provide a reference for the server to parse the form data. When the browser accesses the web page and establishes a connection with the server, when the user opens any form, the server will obtain the attributes, field index and other data of the current version of the form from the data dictionary and send it to the front end through the transmission protocol. In this process, the server will parse the position data of each field in the data dictionary in the form, convert it into logical coordinates (for example, 1, 1; 1, 2) data and transmit it to the front end, which will display the visual elements.
[0117] 8. In relative positioning mode, the front end renders the interface according to logical coordinates and form rules: the front end renders the form controls in an appropriate size according to the current browser window and proportion, and automatically controls the indentation of the controls after the window position changes. During the rendering process, the front end will dynamically control various spacings (page margins, group spacing, field spacing, main-subfield spacing, label field spacing, etc.)
[0118] 9. Form dynamic interaction process: After the initial loading, the front-end rendering is temporarily stopped. However, as the user operates different controls to trigger different events on the server, the front-end will transmit the user's events to the application server in a small number of times. For example, if a certain control is clicked, the focus is switched, or a certain tool is clicked, the application server will determine the user operation results and prompts that should be returned to the front-end based on the configuration information in the form and the standard operation logic of the form, or request the business server to process and judge the business information.
[0119] After returning the information, the front end will re-render some controls, pop up prompt information, report errors, and automatically fill in the data provided by the server based on the new data provided by the server, so as to change with the user's use, thereby flexibly completing the conversation interaction with the user. For different business forms, each user may render and load different controls and their data in each visit due to different business rules, so as to achieve different faces for each person.
[0120] Compared with the prior art, the form page dynamic rendering method of the embodiment of the present application has the following technical effects:
[0121] Effect 1: For custom developers, the original absolute positioning or drag-and-drop form design will bring higher operating costs. Using this form designer will help users reduce the design workload, thereby shortening the implementation cycle and maintenance costs of software projects.
[0122] Effect 2: Many of the original form design tools are closely coupled with fields, and it is necessary to modify the code or reconfigure certain program parameters when adjusting the form interface. This invention achieves the goal of not modifying the code through the mapping relationship between "group", "group attribute", "field", "field attribute" and "control" and the actual rendering data.
[0123] Effect three: For forms previously developed in absolute positioning mode, the invention provides a method for converting forms to logical positioning without modifying the database table structure. This will help the developed system to quickly transition to a new form mode that supports both absolute and relative positioning, reducing R&D costs without having to replace the system or rewrite code.
[0124] Effect 4. This invention is different from the page loading method of many systems. It adopts a method that relies on data dictionary and rule judgment to affect control rendering at runtime, so that page loading is no longer rigid. It can present the data and prompts needed for the next step based on the user's previous operation and the business logic judgment of the business server, avoiding users' repeated, large-scale, and ineffective reading of large tables and forms, bringing convenience in every interaction, thereby reducing users' understanding and usage costs and improving software usage efficiency.
[0125] In order to better illustrate the method for dynamic rendering of form pages implemented in the present application, the entire process of form design, form rendering and form interaction is described in detail below.
[0126] Figure 4 A flow chart of the form design and development phase according to an embodiment of the present application is shown in FIG.
[0127] like Figure 4 As shown, (a) first, the designer accesses the maintenance form interface.
[0128] The designer accesses the form interface through a browser and can retrieve and confirm the form. After selecting the form to be designed, the designer proceeds to the next step, such as selecting a maintenance form for material data in the basic data in ERP.
[0129] (ii) Then introduce form fields or domain-based custom fields.
[0130] Designers can choose to use imported or customized fields in the form. A field visually corresponds to a control or a column in a list.
[0131] For example, if the user chooses to design a form for material data, he or she can choose to introduce form fields. It supports selecting existing fields in any other form, searching and multiple selections through the tree structure menu, and after confirmation, the fields of other forms are automatically substituted into the current form design draft, and the designer can start to carry out structured design of the form. The ability to introduce form fields means that even if the original form in the system is defined or rendered in other ways, it can be converted into a new model form through operations at this level.
[0132] Designers can also choose to define custom fields. Users provide field descriptions and select the field domain type. The system will match the field in the domain that is closest to the user's conditions based on the domain type and the description filled in by the user. If there is no matching field, a new field will be created based on the characteristics of the domain. For example, if a user creates a field "Material Type", enters "Type" into the system and selects the domain as "Enumeration", the system will first search for a field with a description matching "Type" in the enumeration type field. If it is found, it will directly return the field information and properties. If it is not found, a standard enumeration field will be created. Users only need to adjust individual properties as needed to complete the creation of the field.
[0133] 3. Next, we will start the structural design of the form.
[0134] Figure 5 A schematic diagram of structural adjustment in the form design development phase according to an embodiment of the present application is shown in FIG.
[0135] Regarding structured design form controls, after the designer introduces form fields or creates form fields, the fields will be displayed in the design page in a tree structure.
[0136] like Figure 5 As shown, the designer can make the following structural adjustments.
[0137] Drag sorting: Drag the fields in any node with the mouse to place them in a different order. In the tree structure, the vertical order is mapped to the vertical coordinate in the form rendering.
[0138] Drag to determine parent-child fields: Use the mouse to drag a field in any node to place it on the branch of any field, which means it becomes a child field of the field. The horizontal parent-child relationship is mapped to the child field related to the parent field in the form rendering. The distance between the parent and child fields can be set separately. In the table, the parent and child fields each occupy a column, but the effect is different from two independent columns, similar to merging the cells in the header, so that users can have a clearer visual distinction.
[0139] Create a group: Creating a group means adding a node anywhere in the tree structure. This node represents the group. Any group node or any field node can be placed under the group node, but a group node cannot be placed under a field node. The group node is mapped to the form rendering as an abstract object that divides the form blocks.
[0140] As attached Figure 6 As shown in the diagram of creating groups in structured design, under the root node, the form contains three groups, and each group corresponds to a piece of content in the left form. The reason why the forms with flexible distribution such as upper left, lower left, and lower right can be rendered is due to the properties of the group. When the groups are rendered in space, they are positioned in two dimensions with each other, and the groups can set the default alignment. For example, the groups in the figure are all left-aligned by default. The first group is located at the top according to the sorting, and the second group is located at the bottom according to the sorting. There are two subgroups nested in the second group, and the properties are set to be arranged horizontally. Therefore, the sorting of the two subgroups is mapped to their left and right sorting, thereby obtaining a flexible configuration in space.
[0141] Delete nodes: Designers can delete nodes in the tree structure at any time. Deleting the root node means deleting all of them. Deleting a node means deleting all of its child nodes. You can also press and hold the shortcut key to select. This operation method greatly facilitates the maintenance of nodes. There is no need to select them one by one and then operate them. You only need to operate on the nodes to quickly complete the deletion work.
[0142] Compared with the common solution on the market that uses dragging controls to the canvas for visual design, the structured positioning method is simple and eliminates redundant links, which can greatly improve design efficiency.
[0143] (iv) Adjust form properties. After completing the design of structured form controls, the designer can selectively configure the properties of the fields to a certain extent so that they can better meet the needs of users.
[0144] Figure 7 A schematic diagram of editing field properties during form design and development according to an embodiment of the present application is shown in FIG.
[0145] like Figure 7 As shown, after the designer clicks on any field, they can use the edit function to view and modify the properties of the field or group. Figure 7Take field attributes as an example. Field attributes include a series of information such as field name, and the attribute metadata of the field can be modified using the metadata management device according to the design needs. The source of field attributes is: original field, inherited from domain, standard field attributes; so in any case, the designer does not need to configure all attributes from scratch, but only needs to modify information such as alignment, field description, etc.
[0146] (V) Form saving: the designer can click Save at any time. The data of the current form will be saved to the development database and will not take effect. When the designer enters the design of a form again, he can continue the design from the last saved record until he considers the design is complete. At this time, he can enter the form conversion runtime stage.
[0147] (VI) Adjusting the interactive script. One of the features of this patent is that it supports parsing the interactive script through the application server to complete the interactive processing and control between the client and the client, thereby improving the user's interactive experience and providing real-time feedback.
[0148] The interactive script of the embodiment of the present application is written in the fourth-generation programming language. After compilation, it can be run by the application server. In the interactive script, the pre-defined events that can be triggered by the user and the I / O, message feedback, error reporting, program running, data addition, deletion and modification of the form fields are actually defined and processed. For example, when the user clicks on a certain control, the interactive script can first send the information of a certain field filled in by the user in the form to the business server. After the business server verifies and returns the result, the interactive script requires the client to pop up a prompt or control the focus of the control and other feedback.
[0149] (VII) Afterwards, when the form conversion is run, the data format is converted and compiled.
[0150] When the form conversion runtime is used, the form data under development can be written and a data form definition file that is directly parsed and presented by the application side and a set of form data is stored in the database. The two data can recognize each other. The form definition file will be loaded read-only by the application server at runtime, and the form information in the database can be read by the business server so that the actual form information can be combined when making business judgments.
[0151] Figure 8 A flow chart of the form usage phase according to an embodiment of the present application is shown in FIG.
[0152] like Figure 8 As shown, (a) first, the user accesses the form interface.
[0153] When a user accesses a form, the client requests the form definition information from the application server. The application server parses the form definition information in the file and transmits it to the client. If the form has been run before, the information in the cache will be directly used. At the same time, the application server has already requested business data from the business server.
[0154] (2) Load form definition information.
[0155] (III) After loading the form definition information, determine the positioning method based on environmental conditions.
[0156] The client obtains the browser window size and the current form definition information, calculates the width and height of the form according to the form positioning, and determines whether the form can be fully rendered into the current window.
[0157] If possible, absolute positioning will be used to accurately render all controls; if not, relative positioning will be chosen to render the form controls. At this time, the row spacing, column spacing, parent-child field spacing, etc. between controls will change dynamically according to the currently available size to ensure that all controls can be displayed on one screen. If in extreme cases where they still cannot be displayed, the width of the control will be changed according to the data displayed in the control.
[0158] If the control is rendered by positioning, the client will dynamically render the control according to the control position and spacing calculated in the previous step. Under relative positioning, if the window is dragged, the positioning spacing will change dynamically until the pre-configured value of the control spacing is reached. If absolute positioning is used, after rendering, the control position and spacing will not change unless the data is refreshed or re-requested.
[0159] (iv)Next, fill in the form data.
[0160] The application server requests data from the business server according to the form definition. The business server judges the request content and executes the corresponding query statement according to the form information stored in the database to obtain the business data and return the data to the application server. The application server returns it to the front end, and the front end renders the data into the control.
[0161] (V) After the form data is loaded, it is equivalent to that the user has established a connection with the server through the client, and from then on, frequent and intensive form dynamic interaction processes can be started for this business form.
[0162] Once the form interaction is complete, you can close the form.
[0163] Fig. 9 A schematic diagram of the process of dynamic interaction in the form usage phase according to an embodiment of the present application is shown in FIG.
[0164] like Fig. 9As shown, (a) front-end user interaction, inputting information or clicking controls.
[0165] When the form is running, any operation performed by the user on the client will trigger the client's event judgment. The input information during the user interaction will be monitored by the client and judgment will be made in time.
[0166] The client will send valid operations as events to the application server. For example, if a user clicks a control in a form with the mouse, the client will determine it as a valid operation (if the user clicks the border outside the form, etc., the client will determine it as an invalid operation and will not query the application server because it has nothing to do with the standard operation logic of the form and is not a pre-defined event).
[0167] (ii) Next, the application server will determine what kind of subsequent processing should be performed after the event is triggered based on the form definition and the interactive program script, such as feedback, message prompts, and error reports. For example, after the user clicks on a control, the form information determines that the field is read-only information, and the interactive program script will enter the pre-defined read-only information trigger operation scenario. Assuming that the processing definition in this scenario is "move the focus to the next valid control" and does not involve the addition, deletion, modification, or query of business information, the business server will directly return the information to the client. At this time, the user will find that the control originally clicked becomes non-interactive, and the next control lights up and is in a state where input can be made.
[0168] (III) If the user's event trigger involves adding, deleting, modifying and querying business information, such as when a user modifies the enumeration value of a control, the application server will pass the modified value and field information to the business server after receiving it. At this time, the business server will enter the business logic processing flow, such as first determining whether the data is valid and whether it conflicts with other data. If the data is valid and meets the business judgment, the business server will access the business database to complete the addition, deletion, modification and query, and return the result to the application server at the same time. The application server will return the result to the client based on the result. If there is an error or invalidity, the application server will return the information in the format of an error or prompt message.
[0169] When the form page dynamic rendering method of the embodiment of the present application is applied to the application server, the rendering method includes: in the development stage, the designer accesses the form design page, introduces form fields or creates form fields, and displays the form fields in a tree structure on the design page; performs structural adjustments and designs form controls; saves the form to store the form data in the development database of the application server, and enters the form conversion runtime stage; in the form conversion runtime stage, adjusts the interactive script to realize the interaction between the application server and the business server and the front end; through the form conversion runtime, compiles the form data saved in the development stage into form definition information that is directly loaded by the application server in a read-only manner and form information read by the business server; in the dynamic interaction stage, receives the input information during the front-end user interaction to perform information judgment, and sends feedback information. In the development stage of the present application, through structured configuration, developers can use the tree structure to quickly complete the structure construction of the form.
[0170] This application involves innovation in the entire stage from form development to application, which can solve the defects and problems of the above-mentioned existing form design technologies to a certain extent, realize high interactivity and high efficiency of dynamic form rendering, and greatly improve the convenience and usage experience of developers, maintenance personnel and front-end users.
[0171] Example 2
[0172] This embodiment provides a form page dynamic rendering system. For details not disclosed in the form page dynamic rendering system of this embodiment, please refer to the specific implementation content of the form page dynamic rendering method in other embodiments.
[0173] Fig.10 A structural schematic diagram of a form page dynamic rendering system according to an embodiment of the present application is shown in FIG.
[0174] like Fig.10 As shown, the form page dynamic rendering system includes an application server 1, a business server 2 and a front end 3, and the application server 1 is connected to the business server 2 and the front end 3.
[0175] Application server 1 is used for designers to access the form design page during the development phase, introduce form fields or create form fields, and display the form fields in a tree structure on the design page; make structural adjustments and design form controls; save the form to store the form data in the development database of the application server, and enter the form conversion runtime phase;
[0176] The application server 1 is also used to adjust the interactive script to realize the interaction between the application server and the business server and the front end during the form conversion runtime; during the form conversion runtime, the form data saved in the development phase is compiled into form definition information directly loaded by the application server in a read-only manner and form information read by the business server;
[0177] The application server 1 is also used to receive input information from the front-end user during the dynamic interaction stage, make information judgment, and send feedback information;
[0178] Business server 2 is used to receive the form values or fields of addition, deletion, modification and query sent by the application server during the dynamic interaction stage, and the business server enters the processing flow of the business logic;
[0179] If the data is valid and meets the business judgment, the business database of the business server is accessed to perform addition, deletion, modification and query operations, and the execution results are returned to the application server at the same time;
[0180] If the data is wrong or invalid, an error or prompt message will be returned to the application server;
[0181] Front-end 3 is used for the front-end user to access the form interface during the form rendering stage, and receive the form definition information in the file parsed by the application server; determine the positioning method according to the form rendering environment and the form definition information, and render the form controls according to the positioning method; receive the business data requested by the application server to the business server and fill in the form data; enter the dynamic interaction stage after the form rendering and loading are completed. In the dynamic interaction stage, the input information of the front-end user is sent to the application server, and the feedback information of the application server is received.
[0182] Through structured configuration, developers can use the tree structure to quickly complete the form structure. Compared with the existing technology, this application does not require cumbersome visual dragging. By using domain definition attributes and original attribute migration, the attributes and configuration information in the form fields can be quickly assigned to the new form, which reduces the cost of development and maintenance over time.
[0183] Using the form page dynamic rendering system of the present application, during the development phase of the application server, the designer accesses the form design page, introduces form fields or creates form fields, and displays the form fields in a tree structure on the design page; makes structural adjustments and designs form controls; saves the form to store the form data in the development database of the application server, and enters the form conversion runtime phase; during the form conversion runtime phase, adjusts the interaction script to realize the interaction between the application server and the business server and the front end; through the form conversion runtime, compiles the form data saved in the development phase into form definition information that is directly loaded read-only by the application server and form information read by the business server; during the dynamic interaction phase, receives input information from the front-end user during interaction, makes information judgment, and sends feedback information.
[0184] This application solves the defects and problems of existing form design technology to a certain extent, realizes high interactivity and high efficiency of dynamic form rendering, and greatly improves the convenience and usage experience of developers, maintenance personnel and front-end users.
[0185] Example 3
[0186] This embodiment provides a memory. For details not disclosed in the memory of this embodiment, please refer to the specific implementation content of the form page dynamic rendering method or system in other embodiments.
[0187] Fig.11 A schematic diagram of the structure of a memory 400 according to an embodiment of the present application is shown in FIG.
[0188] like Fig.11 As shown, the memory 400 includes: a storage unit 402: used to store executable instructions; and a processing unit 401: used to connect with the storage unit 402 to execute the executable instructions to complete the form page dynamic rendering method.
[0189] Those skilled in the art will understand that Fig.11 It is only an example of the memory 400 and does not constitute a limitation of the memory 400. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the memory 400 may also include input and output devices, network access devices, buses, etc.
[0190] The so-called processing unit 401 (Central Processing Unit, CPU) can also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or the processing unit 401 can also be any conventional processor, etc. The processing unit 401 is the control center of the memory 400, and uses various interfaces and lines to connect various parts of the entire memory 400.
[0191] The storage unit 402 can be used to store computer-readable instructions. The processing unit 401 implements various functions of the memory 400 by running or executing the computer-readable instructions or modules stored in the storage unit 402 and calling the data stored in the storage unit 402. The storage unit 402 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the memory 400, etc. In addition, the storage unit 402 can include a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM) or other non-volatile / volatile storage devices.
[0192] If the module integrated in the memory 400 is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also instruct the relevant hardware to complete it through computer-readable instructions. The computer-readable instructions can be stored in a computer-readable storage medium, and when the computer-readable instructions are executed by the processor, the steps of each of the above-mentioned method embodiments can be implemented.
[0193] Example 5
[0194] This embodiment provides a computer-readable storage medium on which a computer program is stored; the computer program is executed by a processor to implement the form page dynamic rendering method in other embodiments.
[0195] The memory and storage medium of the embodiment of the present application include: in the development stage, the designer accesses the form design page, introduces form fields or creates form fields, and displays the form fields in a tree structure on the design page; performs structural adjustments and designs form controls; saves the form to store the form data in the development database of the application server, and enters the form conversion runtime stage; in the form conversion runtime stage, adjusts the interactive script to realize the interaction between the application server and the business server and the front end; through the form conversion runtime, compiles the form data saved in the development stage into form definition information that is directly loaded by the application server in a read-only manner and form information read by the business server; in the dynamic interaction stage, receives the input information during the front-end user interaction to make information judgments, and sends feedback information. In the development stage of the present application, through structured configuration, developers can use the tree structure to quickly complete the structure construction of the form.
[0196] This application involves innovation in the entire stage from form development to application, which can solve the defects and problems of the above-mentioned existing form design technologies to a certain extent, realize high interactivity and high efficiency of dynamic form rendering, and greatly improve the convenience and usage experience of developers, maintenance personnel and front-end users.
[0197] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0198] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0199] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0200] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0201] The terms used in the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "the" and "the" used in the present invention and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0202] It should be understood that although the terms first, second, third, etc. may be used in the present invention to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present invention, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0203] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0204] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for dynamic rendering of a form page, characterized in that: Applied to the application server, the application server is connected to the business server and the front end; The rendering method comprises: In the development stage, the designer accesses the form design page, introduces form fields or creates form fields, and displays the form fields in a tree structure on the design page; performs structural adjustments and designs form controls; saves the form to store the form data in the development database of the application server, and enters the form conversion runtime stage; the structural adjustments include dragging fields in any node to sort, dragging fields in any node to determine parent and child, adding nodes to the tree structure to create groups, and deleting nodes in the tree structure; During the form conversion runtime, the interactive script is adjusted to realize the interaction between the application server and the business server and the front end; during the form conversion runtime, the form data saved in the development phase is compiled into form definition information that is directly read-only loaded by the application server and form information that is read by the business server; In the dynamic interaction stage, the input information of the front-end user interaction is received to make information judgment and send feedback information; Wherein, in the dynamic interaction stage, receiving the input information of the front-end user during the interaction and performing information judgment includes: receiving the input information of the front-end user and the corresponding valid event; Determine the interactive information of the valid event according to the form definition information and the interactive script, and perform operation feedback, message prompts and error reporting according to the interactive information; The performing of operation feedback, message prompts, and error reporting according to the interaction information includes: The valid events include adding, deleting, modifying and checking business information, and the application server sends the form values or fields of the adding, deleting, modifying and checking to the business server; Receive the execution results, error messages or prompts from the business server and feed them back to the front-end user; Applied to the front end, the rendering method includes: In the form rendering stage, the front-end user accesses the form interface and receives the form definition information in the file parsed by the application server; determines the positioning method according to the form rendering environment and the form definition information, and renders the form controls according to the positioning method; receives the business data requested by the application server to the business server and fills the form data; enters the dynamic interaction stage after the form rendering and loading is completed; the positioning methods include absolute positioning and relative positioning; In the dynamic interaction stage, the input information of the front-end user is sent to the application server, and the feedback information of the application server is received; Applied to the business server, the rendering method includes: In the dynamic interaction stage, the form value or field for addition, deletion, modification and query sent by the application server is received, and the business server enters the processing flow of the business logic; If the data is valid and meets the business judgment, the business database of the business server is accessed to perform addition, deletion, modification and query operations, and the execution results are returned to the application server at the same time; If the data is erroneous or invalid, an error or prompt message will be returned to the application server.
2. The rendering method according to claim 1, characterized in that: The introduction of form fields or field-based customization includes: Select existing fields in forms of other templates, search and select multiple fields through the tree structure menu, and substitute the confirmed fields into the current form design page; Or by providing a field description and selecting the field domain type, match the fields in the corresponding domain. If a match is found, the field information and properties are returned; if no match is found, a new field is created based on the characteristics of the domain.
3. The rendering method according to claim 1, characterized in that: The structural adjustment and design of the form control comprises: Attach the introduced fields to the root node in a tree structure; Structural adjustment of the tree structure includes: using absolutely positioned fields to generate certain two-dimensional logical coordinates through tree structure management, clearly defining the relationship between fields, assigning values to the two-dimensional logical coordinate data according to a configurable metadata dictionary and storing them in a development database; attaching any field to a set to form a field group, performing batch processing, control positioning and style management between groups through the attributes of the field group; and controlling the function of any field by adjusting and configuring the attributes of the field.
4. A form page dynamic rendering system, characterized in that: It includes an application server, a business server and a front end, wherein the application server is connected to the business server and the front end; The application server is used for, during the development phase, a designer to access a form design page, introduce form fields or create form fields, and display the form fields in a tree structure on the design page; Make structural adjustments and design form controls; Save the form to store the form data in the development database of the application server and enter the form conversion runtime stage; The structural adjustment includes dragging fields in any node to sort, dragging fields in any node to determine parent and child, adding nodes to the tree structure to create groups, and deleting nodes in the tree structure; The application server is used to adjust the interactive script to realize the interaction between the application server and the business server and the front end during the form conversion runtime stage; When the form conversion runtime is used, the form data saved in the development phase is compiled into form definition information that is directly loaded by the application server in a read-only manner and form information that is read by the business server. The application server is used to receive input information from the front-end user during the dynamic interaction stage, make information judgment, and send feedback information; Wherein, in the dynamic interaction stage, receiving the input information of the front-end user during the interaction and performing information judgment includes: receiving the input information of the front-end user and the corresponding valid event; Determine the interactive information of the valid event according to the form definition information and the interactive script, and perform operation feedback, message prompts and error reporting according to the interactive information; The performing of operation feedback, message prompts, and error reporting according to the interaction information includes: The valid events include adding, deleting, modifying and checking business information, and the application server sends the form values or fields of the adding, deleting, modifying and checking to the business server; Receive the execution result, error or prompt information of the business server and feed it back to the front-end user; the business server is used to receive the form value or field of addition, deletion, modification and query sent by the application server in the dynamic interaction stage, and the business server enters the processing flow of the business logic; If the data is valid and meets the business judgment, the business database of the business server is accessed to perform addition, deletion, modification and query operations, and the execution results are returned to the application server at the same time; If the data is wrong or invalid, an error or prompt message will be returned to the application server; The front end is used to allow the front end user to access the form interface during the form rendering stage, receive form definition information in a file parsed by the application server; determine a positioning method based on the form rendering environment and the form definition information, and render form controls according to the positioning method; receive business data requested by the application server to the business server and fill in the form data; enter the dynamic interaction stage after the form rendering and loading are completed, and in the dynamic interaction stage, send the input information of the front end user to the application server and receive feedback information from the application server.
5. A memory, characterized in that: include: A storage unit for storing executable instructions; as well as A processing unit, configured to be connected to the memory to execute executable instructions to complete the method according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that: A computer program is stored thereon; the computer program is executed by a processor to implement the method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Converting presentation metadata to a browser-renderable format during compilation
CN106663090A
Guitar intermediate layer rendering system
CN111580814A
Method and device for realizing draggable custom form component based on mobile terminal
CN111597489A
Component configuration method and device based on relational graph and computer readable storage medium
CN111736836A
Form rendering method and form rendering system
CN113568693A
