A form processing method and device based on form designer
Through form processing methods based on form designer, parsing and mounting common form commands, the problem of rewriting the public logic part in form development needs to be solved, and the development efficiency and user experience are improved.
Patent Information
- Application Number
- CN202110968351.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-23
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2041-08-23
AI Technical Summary
During form development, the public logic part of the control layer of the form needs to be re-written, resulting in waste of developers' time and reduced user experience.
Provides a form processing method based on the form designer. By obtaining pre-stored command components, analyzing form general commands, displaying command identification lists, determining selected commands based on user operations, and mounting them to form element events.
It reduces the difficulty of form development, improves form development efficiency and form designer usage experience, and reduces the repetitive work of developers.
Smart Images

Figure CN113761857B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a form processing method and device based on a form designer. Background Art
[0002] The form is mainly responsible for data collection in a web page. A form has three basic components: form tag, form field, and form button. Among them, the form tag contains the URL of the CGI program used to process the form data and the method of submitting the data to the server. The form field includes text boxes, password boxes, hidden fields, multi-line text boxes, check boxes, radio buttons, drop-down selection boxes, and file upload boxes. The form buttons include submit buttons, reset buttons, and general buttons, which can be used to transmit data to the CGI script on the server or cancel input. The form button can also be used to control other processing tasks that define the processing script.
[0003] At present, in the process of form development, the common logic part of the form's control layer is generally reusable and can meet most form development requirements. When developers develop a new form, the reusable common logic part of the control layer needs to be rewritten, which wastes the developer's time and resources and also reduces the user experience of the form designer. Summary of the invention
[0004] The embodiments of the present application provide a form processing method and device based on a form designer, which are used to reduce the difficulty of form development, improve the efficiency of form development and the user experience of the form designer.
[0005] On the one hand, the present application provides a form processing method based on a form designer, the method comprising:
[0006] Based on the user's first operation, a pre-stored command component is obtained. The command component is composed of at least one form common command. Through a preset form designer, the form common commands in the command component are parsed to obtain a command identification list composed of each form common command and display it to the user. Based on the user's second operation, according to the command identification list, the command identification of at least one selected command corresponding to the form to be constructed is determined. From the pre-stored command components, the selected command corresponding to the command identification is determined, and the selected command is added to the form view model corresponding to the form to be constructed. Based on the user's third operation, each selected command is mounted to the form element event of the form to be constructed.
[0007] In one implementation of the present application, based on the fourth operation of the user, a form general command of the form to be constructed is determined. Each form general command is encapsulated as a method body, and the variables and data corresponding to each form general command are exposed to the command component in the form of command parameters as input attributes, so as to configure the parameters and / or expressions of the form general command when the command component is used.
[0008] In one implementation of the present application, a reference relationship between form metadata of a form to be constructed and command component metadata of a command component is determined, and the reference relationship is recorded in the form metadata of the form to be constructed, so that the command component can be obtained through a form engine according to the reference relationship in the form metadata.
[0009] In one implementation of the present application, a target form corresponding to a form to be constructed is generated. A form element event is determined through a form engine. According to the form element event, a selected command mounted to the form element event is determined so that the command engine searches for a method body corresponding to the selected command. The method body of the selected command is called and parsed to respond to the form element event.
[0010] In an implementation of the present application, an association relationship between the form to be constructed and the selected command is generated, and the association relationship is added to the command collection node of the form view model.
[0011] In one implementation of the present application, a parameter description carried by the selected command is determined, and displayed to the user to determine a parameter value corresponding to the parameter description according to the user's fifth operation. The parameter value includes at least: a specific value and a parameter expression. The parameter value is used as a component element of the selected command and added to the form view model of the form to be constructed.
[0012] In one implementation of the present application, the user's identity is determined. Based on the identity, it is determined whether the user is a form developer. If so, a form to be constructed is generated based on the user's interactive operation. The interactive operation at least includes: clicking on a form element and entering information in a form input field.
[0013] In one implementation of the present application, the form general commands include at least one or more of the following: a save command, an edit command, and a add command.
[0014] In one implementation of the present application, the form metadata includes: a form paradigm representing a data entity structure corresponding to the form, a component set representing interface elements of the form, and a form view model representing the content of a runtime view model layer.
[0015] On the other hand, the present application also provides a form processing device based on a form designer, the device comprising:
[0016] At least one processor; and a memory in communication with the at least one processor. The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:
[0017] Based on the user's first operation, a pre-stored command component is obtained. The command component is composed of at least one form common command. Through a preset form designer, the form common commands in the command component are parsed to obtain a command identification list composed of each form common command and display it to the user. Based on the user's second operation, according to the command identification list, the command identification of at least one selected command corresponding to the form to be constructed is determined. From the pre-stored command components, the selected command corresponding to the command identification is determined, and the selected command is added to the form view model corresponding to the form to be constructed. Based on the user's third operation, each selected command is mounted to the form element event of the form to be constructed.
[0018] Through the above solution, the user can be provided with a convenient and quick service of mounting form element events to form general commands when using the form designer, which can improve the user experience of the form designer and reduce the complexity of the user's operation of the form designer. At the same time, it also improves the work efficiency of the user using the form designer to develop forms, bringing a good user experience to the user. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] 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:
[0020] Figure 1 A flowchart of a form processing method based on a form designer in an embodiment of the present application;
[0021] Figure 2 A schematic diagram of a form processing method based on a form designer in an embodiment of the present application;
[0022] Figure 3 Another schematic diagram of a form processing method based on a form designer in an embodiment of the present application;
[0023] Figure 4 Another flowchart of a form processing method based on a form designer in an embodiment of the present application;
[0024] Figure 5 A structural schematic diagram of a form processing device based on a form designer in an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0026] As shown in this application and claims, unless the context clearly indicates an exception, in the specific embodiments of this application, the words "first", "second", "third", "fourth", etc. do not specifically refer to a sequential relationship, but may also be numerals that distinguish specific steps, elements, etc.
[0027] Forms are widely used, so form developers need to use form designers to design forms that support different purposes. When using the form designer, because different types of forms have many common reusable control layer common logics, currently form developers need to manually type in code or manually select to configure these reusable control layer common logics. Both of the above methods are not friendly to form developers, have high requirements for form developers, and waste their working time.
[0028] In order to facilitate form developers to use the form designer and improve the form developers' experience of using the form designer, a form processing method on the form designer is urgently needed.
[0029] Based on this, an embodiment of the present application provides a form processing method and device based on a form designer, which is used to improve the work efficiency of form developers and improve the user experience of the form designer.
[0030] The following describes in detail various embodiments of the present application in conjunction with the accompanying drawings.
[0031] The present application embodiment provides a form processing method based on a form designer, such as Figure 1 As shown, the method may include steps S101-S105:
[0032] S101. The server obtains a pre-stored command component based on a first operation of a user.
[0033] The command component is composed of at least one general command of the form.
[0034] Before executing step S101 , firstly, the server determines the form general command of the form to be constructed based on the fourth operation of the user.
[0035] The general form commands include at least one or more of the following: save command, edit command, and add command.
[0036] The form common commands are common to different types of forms. In addition to the commands listed above, the form common commands can also contain more commands, or a new command can be used as a form common command during user use. The commands in the form common commands record the necessary information such as the controller service class and method name where the method is located. The method corresponding to the command can be used with the necessary information. The controller service class encapsulates the properties and methods of the common logic of the control layer.
[0037] Then, the server encapsulates each form common command as a method body, and exposes the corresponding variables and data of each form common command to the command component in the form of command parameters as input attributes, so as to configure the parameters and / or expressions of the form common command when the command component is used.
[0038] Specifically, the server can abstract the commonly used form control layer logic based on the user's operation, such as loading data, deleting data, saving data, closing the page, etc. These abstracted form control layer logics are encapsulated as the method body of the command, and the form-related variables and data are exposed to the command component as input attributes in the form of command parameters, and the corresponding parameters or expressions are configured when the command component is used. Finally, the form control layer logic is preset into the development platform in the form of a command component.
[0039] The specific structure of the command component can be as follows Figure 2 As shown, for example, the command component is a command component of a card form, which includes a save command, an edit command, a new command, etc.
[0040] In addition, the present application can also identify the user identity of the form designer and provide services of the form processing method.
[0041] First, the server determines the user's identity.
[0042] The user's identity identifier may be the user's Internet Protocol (IP) address or the user's login account (Identity document, ID), and this application does not make any specific restrictions on this.
[0043] The server then determines whether the user is a form developer based on the identity identifier.
[0044] Through the identity identifier, the server can match the identity identifier with the identity identifiers pre-stored in the database, and then determine whether the identity identifier belongs to the category of the form developer.
[0045] Finally, if the identity belongs to the category of form developer, that is, the user is determined to be a form developer, the server generates a form to be constructed according to the user's interactive operation, wherein the interactive operation at least includes: clicking on a form element and inputting information in a form input field.
[0046] The two interactive operations provided above are only two exemplary operations. There is no specific limitation on the specific contents of the interactive operations, and more operations may be included in actual use.
[0047] When the form developer needs to use the form control layer logic, the form developer can perform corresponding operations on the form designer. After the server obtains the operation of the form developer on the form designer, it obtains the pre-stored command component.
[0048] In the embodiment of the present application, after the command component is configured, it is necessary to establish a corresponding relationship with the form to be constructed. Through the established relationship, the command component can be determined during the operation of the form to be constructed. Therefore, the present application may include the following implementation methods:
[0049] First, the server determines a reference relationship between the form metadata of the form to be constructed and the command component metadata of the command component.
[0050] Then, the server records the reference relationship in the form metadata of the form to be constructed, so as to obtain the command component according to the reference relationship in the form metadata through the form engine.
[0051] Specifically, metadata, also known as intermediary data or relay data, is data that describes data, mainly information that describes data attributes, and is used to support functions such as indicating storage locations, historical data, resource searches, and file records. In this application, form metadata may include: a form paradigm that represents the data entity structure corresponding to the form, a component set that represents the interface elements of the form, and a form view model that represents the content of the runtime view model layer. In actual use, form metadata may also include other data. The above metadata provided in this application does not limit all the content contained in the form metadata. The composition of form metadata is as follows: Figure 3 As shown, the form metadata may contain form paradigm, form element collection, form view model, and other properties.
[0052] This application establishes a reference relationship between the form metadata of the form to be constructed and the command component metadata of the command component, and records the reference relationship in the form metadata of the form to be constructed. When operating the form, the preset command component can be introduced by metadata reference.
[0053] By encapsulating common form commands, it is possible to provide convenience for form developers, reduce their repetitive work, and improve their work efficiency.
[0054] In the embodiments of the present application, the server is merely used as an exemplary execution subject of a form processing method based on a form designer, and the present application does not specifically limit the execution subject.
[0055] S102: The server parses the form common commands in the command component through a preset form designer, obtains a command identifier list consisting of the form common commands, and displays it to the user.
[0056] Before the command component is introduced into the form to be constructed, all commands contained in the command component will be parsed by the form designer. The parsed commands are used as the alternative addition items of the commands of the form to be constructed, namely the command identification list, for the form developer (user) to select.
[0057] A command identifier list is displayed to form developers, making it convenient for them to select the commands they need, thus reducing the operations of form developers and lowering the development threshold of form development.
[0058] S103: Based on the second operation of the user and according to the command identifier list, the server determines the command identifier of at least one selected command corresponding to the form to be constructed.
[0059] In the embodiment of the present application, the user (form developer) can perform a second operation on the form designer, for example, the user clicks to add a command in the command editor of the form designer, the server displays a list of command identifiers, and the user selects a command identifier by clicking. The command identifier is the command identifier of the selected command.
[0060] S104: The server determines the selected command corresponding to the command identifier from the pre-stored command components, and adds the selected command to the form view model corresponding to the form to be constructed.
[0061] In the embodiment of the present application, after determining the command identifier of the selected command, the server can determine the selected command corresponding to the command identifier in the command component.
[0062] For example, the user selects command identifier A in the command editor of the form designer, and the command editor interface displays parameter information of the selected command defined by command identifier A in the command component, such as data ID.
[0063] The server adds the selected command to the form view model corresponding to the form to be constructed. The selected command can also be added to other addable locations of the form to be constructed. In order to improve the convenience of use, this application adds the selected command to the form view model. The form view model is one of the core contents of the form metadata.
[0064] Furthermore, in the embodiment of the present application, after adding the selected command to the form view model corresponding to the form to be constructed, the following method may also be executed:
[0065] The server generates an association relationship between the form to be constructed and the selected command, and adds the association relationship to the command collection node of the form view model.
[0066] In an embodiment of the present application, the server can determine the selected command corresponding to the form to be constructed, as well as the association relationship between the selected command and the form to be constructed, and add the association relationship to the command collection node in the form view model. The association relationship between the form to be constructed and the selected command can be: there is a reference relationship between the command component metadata in the form metadata of the form to be constructed, and the command component is determined through the reference relationship, and based on the user selection operation, the selected command in the command component is obtained. The form view model includes a number of command collection nodes, and the command collection nodes record data related to the form view model.
[0067] That is, by adding an association relationship between the form to be constructed and the selected command in the command collection node of the form view model, the command in the command component can be quickly determined in the form view model after the form is generated.
[0068] In an embodiment of the present application, the form general commands include commands that require the user to supplement parameter values. Therefore, the present application can guide the user to supplement the parameter values through the following implementation methods.
[0069] Specifically, after adding the association relationship to the command collection node under the form view model, the server determines the parameter description carried by the selected command and displays it to the user to determine the parameter value corresponding to the parameter description according to the user's fifth operation. The parameter value includes at least: a specific value and a parameter expression.
[0070] According to the parameter description in the selected command, the user is guided to supplement different types of parameter values, saving user operation time and improving user experience.
[0071] The server takes the parameter values as elements of the selected command and adds them to the form view model of the form to be constructed.
[0072] S105: Based on the user's third operation, the server mounts each selected command to a form element event of the form to be constructed.
[0073] In an embodiment of the present application, the server may bind a form element event to a selected command to implement an operation of mounting the form element event to the selected command.
[0074] For example, form element B is selected in the form designer, and form element B is a button. The server can determine the properties of the button and display the property panel of the button through the form designer. The property panel displays the configurable properties and events supported by the button, such as click events, drag events, etc. Based on the user's operation, the event of the button is determined, and the selected command corresponding to the event of the button is determined. The server records the association relationship between the button and the corresponding form view model and the selected command in the description object corresponding to the button, thereby realizing the form element event mounting selected command.
[0075] After completing the selection command to mount to the form element event, this application can also execute the following methods:
[0076] First, the server generates a target form corresponding to the form to be constructed.
[0077] The target form may be a form designed by a form developer using a form designer, or may be an unfinished form.
[0078] Secondly, the server determines the form element events through the form engine.
[0079] The form engine can capture form element events, such as button click events.
[0080] Subsequently, the server may determine the selected command mounted to the form element event according to the form element event, so that the command engine searches for a method body corresponding to the selected command.
[0081] The server captures the form element event, determines the association between the form view model recorded in the description object of the form element of the form element event and the selected command, and then determines the selected command mounted by the form element event. The server calls the method of the selected command according to the controller service class and method name corresponding to the selected command.
[0082] Finally, the server calls and parses the method body of the selected command in response to the form element event.
[0083] In simple terms, the flowchart of the form processing method based on the form designer can be as follows: Figure 4As shown: after the form processing method starts, execute S401, the server pre-places the controller service class and method name of the control layer common logic into the command component; execute S402, the server introduces the command component metadata in the form metadata; execute S403, the server adds the command component introduced by the form metadata to the form view model; execute S404, the server mounts the selected command on the form element event; execute S405, the server selects the form element event to which the command responds at runtime. Finally, the process of the form processing method is completed.
[0084] Through the above scheme, the present application can reduce the operations of form developers. In the prior art, form developers need to handwrite the instructions or codes corresponding to a command, and then register the event corresponding to the command and the form element corresponding to the event, and then realize the response of the form element event through the form element event mounting command. The operation is cumbersome and complicated, and requires a high level of proficiency from form developers. The present application encapsulates the command method body of the general form commands, allowing form developers to reduce the amount of code writing. During the form development process, these general form commands can be used to achieve the purpose of the form element event mounting command through simple operations. It saves the development time of form developers and improves the work efficiency of form developers. At the same time, it also lowers the threshold for form development and improves the user experience of the form designer.
[0085] Figure 5 A form processing device based on a form designer provided in an embodiment of the present application is characterized in that the device includes:
[0086] At least one processor; and a memory in communication with the at least one processor. The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:
[0087] Based on the user's first operation, a pre-stored command component is obtained. The command component is composed of at least one form common command. Through a preset form designer, the form common commands in the command component are parsed to obtain a command identification list composed of each form common command and display it to the user. Based on the user's second operation, according to the command identification list, the command identification of at least one selected command corresponding to the form to be constructed is determined. From the pre-stored command components, the selected command corresponding to the command identification is determined, and the selected command is added to the form view model corresponding to the form to be constructed. Based on the user's third operation, each selected command is mounted to the form element event of the form to be constructed.
[0088] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0089] The device and method provided in the embodiments of the present application correspond one to one, and therefore, the device also has similar beneficial technical effects as the corresponding method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the device will not be repeated here.
[0090] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0091] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A form processing method based on a form designer, characterized in that: The method comprises: Based on the first operation of the user, a pre-stored command component is obtained; the command component is composed of at least one form general command; By using a preset form designer, the form general commands in the command component are parsed to obtain a command identification list composed of each form general command and display it to the user; Based on the second operation of the user, determining the command identifier of at least one selected command corresponding to the form to be constructed according to the command identifier list; Determine a selected command corresponding to the command identifier from the pre-stored command components, and add the selected command to the form view model corresponding to the form to be constructed; Based on the third operation of the user, each of the selected commands is mounted to a form element event of the form to be constructed.
2. The method according to claim 1, characterized in that: Before acquiring the pre-stored command component, the method further includes: Based on a fourth operation of the user, determining the form general command of the form to be constructed; Each of the form general commands is encapsulated as a method body, and the corresponding variables and data of each of the form general commands are exposed to the command component as input attributes in the form of command parameters, so as to configure the parameters and / or expressions of the form general commands when the command component is used.
3. The method according to claim 1, characterized in that: Get the pre-stored command components, including: Determine a reference relationship between the form metadata of the form to be constructed and the command component metadata of the command component; The reference relationship is recorded in the form metadata of the form to be constructed, so that the command component is obtained according to the reference relationship in the form metadata through the form engine.
4. The method according to claim 1, characterized in that: After mounting each of the selected commands to the form element event of the form to be constructed, the method further includes: Generate a target form corresponding to the form to be constructed; Determine the form element event through the form engine; According to the form element event, determining the selected command mounted to the form element event, so that the command engine searches for a method body corresponding to the selected command; The method body of the selected command is called and parsed in response to the form element event.
5. The method according to claim 1, characterized in that: Adding the selected command to the form view model corresponding to the form to be constructed specifically includes: An association relationship between the form to be constructed and the selected command is generated, and the association relationship is added to a command collection node of the form view model.
6. The method according to claim 5, characterized in that: After adding the association relationship to the command set node under the form view model, the method further includes: Determine the parameter description carried by the selected command, and display it to the user so as to determine the parameter value corresponding to the parameter description according to the fifth operation of the user; wherein the parameter value at least includes: a specific value and a parameter expression; The parameter value is used as a constituent element of the selected command and added to the form view model of the form to be constructed.
7. The method according to claim 1, characterized in that: The method further comprises: Determining the identity of the user; Determining whether the user is a form developer according to the identity identifier; If so, the form to be constructed is generated according to the user's interactive operation; wherein the interactive operation at least includes: clicking on a form element and inputting information in a form input field.
8. The method according to claim 1, characterized in that: The form general commands include at least one or more of the following: save command, edit command, and add command.
9. The method according to claim 3, characterized in that: The form metadata includes: a form paradigm representing a data entity structure corresponding to the form, a component set representing interface elements of the form, and a form view model representing the content of a runtime view model layer.
10. A form processing device based on a form designer, characterized in that: The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Based on the first operation of the user, a pre-stored command component is obtained; the command component is composed of at least one form general command; By using a preset form designer, the form general commands in the command component are parsed to obtain a command identification list composed of each form general command and display it to the user; Based on the second operation of the user, determining the command identifier of at least one selected command corresponding to the form to be constructed according to the command identifier list; Determine a selected command corresponding to the command identifier from the pre-stored command components, and add the selected command to the form view model corresponding to the form to be constructed; Based on the third operation of the user, each of the selected commands is mounted to a form element event of the form to be constructed.
Citation Information
Patent Citations
Method and device for implementing user-level-changeable view of ERP form
CN103777936A
Operating command processing method and device
CN103914290A