Page program development method and device
Through low-code development methods, parsing program information collection, selecting component templates, generating functional components and configuring association relationships, the problems of redundant code and repeated development in page program development are solved, and development efficiency and flexibility are improved.
Patent Information
- Application Number
- CN202310722431.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-16
- Publication Date
- 2024-12-17
AI Technical Summary
During the development of page programs, redundant code and manual repeated development lead to inefficiency, and repeated implementation of the same functions in different businesses is wasted resources, which reduces development efficiency.
Through low-code development methods, we obtain program information collection, parse and select component templates, generate functional components, and configure the association relationship between components, automatically build page programs, reduce manual participation, and use reusable component templates to improve development efficiency.
It reduces development difficulty, improves the development efficiency of page programs, reduces redundant code and repeated development, and improves development efficiency and flexibility.
Smart Images

Figure CN119149020A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present specification relate to the field of computer application technology, and more particularly to a method and device for developing a page program. Background Art
[0002] At present, web pages are widely used as an important interface for computer interaction. For example, data query, data submission, resource browsing, etc. are performed through web pages. Therefore, the implementation of various businesses requires the development of web page programs.
[0003] However, during the development process of page programs, due to various reasons, such as redundant codes, manual repetitive development, etc., the development efficiency is often low. Summary of the invention
[0004] In order to solve the above problems, the embodiments of this specification provide a method and device for developing a page program. The technical solution is as follows.
[0005] A page program development method, comprising:
[0006] Acquire a program information set for describing a target page program; the program information set includes at least one component function information; any component function information corresponds to a function that the target page program needs to implement, and any component function information is used to describe: a functional component that implements a corresponding function;
[0007] For any component function information in the program information set, determine the corresponding function, and select a component template for implementing the determined function from a preset component template set; in the component template set, any component template contains a code for implementing the function; according to the component function information, fill in the selected component template to generate a functional component for implementing the determined function;
[0008] The association relationship between different functional components is configured, and the generated functional components and the configured association relationship are integrated to obtain an executable target page program.
[0009] Optionally, the generated one or more functional components correspond to interface controls; the program information set further includes page layout information, and the page layout information includes: layout information of the functional components corresponding to the interface controls;
[0010] The generated functional components and configured association relationships are synthesized to obtain an executable target page program, including:
[0011] For the generated functional components, a page is constructed according to the page layout information, and the layout of the interface controls corresponding to the functional components in the constructed page is set; the constructed page, the generated functional components and the configured association relationships are integrated to obtain an executable target page program.
[0012] Optionally, the functional components corresponding to the interface controls include: functional components to be displayed that have page display requirements;
[0013] The step of setting the layout of the interface controls corresponding to the functional components in the constructed page includes: setting the layout of the interface controls corresponding to the functional components to be displayed in the constructed page;
[0014] The target page program is used to render a page during operation, and the rendered page includes: an interface control corresponding to the functional component to be displayed.
[0015] Optionally, the interface control corresponding to the generated functional component is determined according to component function information and / or page layout information.
[0016] Optionally, the layout information of the interface control includes at least one of the following: the position of the interface control in the page, the stacking relationship between the interface controls, and the display size limit of the interface control in the page.
[0017] Optionally, the preset component template set includes: a backend interaction component template; the backend interaction component template is used to implement data interaction with the backend;
[0018] The generated functional components include backend interaction components;
[0019] The target page program is used to perform data interaction with the backend through the backend interaction component during operation.
[0020] Optionally, the preset component template set includes: a trigger function component template; the trigger function component template is used to trigger the associated backend interaction component;
[0021] The generated functional components also include triggering functional components;
[0022] The target page program is used to trigger the associated backend interaction component to perform data interaction with the backend during operation by triggering the functional component when the corresponding interface control is triggered.
[0023] Optionally, the preset component template set includes: an input function component template; the input function component template is used to implement: obtaining data input for a corresponding interface control;
[0024] The generated functional components include an input functional component;
[0025] The target page program is used to obtain data input for the corresponding interface control through the input function component during operation.
[0026] Optionally, the preset component template set includes: an input function component template and a backend interaction component template; the input function component template is used to implement the function of obtaining input data of the corresponding interface control; the backend interaction component template is used to implement: data interaction with the backend according to the input data obtained by the associated input function component;
[0027] The generated functional components include input functional components and backend interaction components;
[0028] The target page program is used to obtain input data through the input function component during operation, and to perform data interaction with the backend through the backend interaction component according to the input data of the associated input function component.
[0029] Optionally, the preset component template set includes: a backend interaction component template and a result function component template; the backend interaction component template is used to implement data interaction with the backend; the result function component template is used to implement: rendering and displaying the data interaction results in the associated backend interaction component in the page;
[0030] The generated functional components include backend interaction components and result functional components;
[0031] The target page program is used to perform data interaction with the backend through the backend interaction component during operation, and to render and display the data interaction results in the associated backend interaction component in the page through the result function component.
[0032] Optionally, the association relationship between functional components is determined based on component function information.
[0033] Optionally, the program information set further includes page layout information; the page layout information includes associations between functional components;
[0034] The configuration of the association relationship between different functional components includes:
[0035] According to the page layout information, the association relationship between different functional components is configured.
[0036] Optionally, the method is applied to a server, and the server stores a preset functional component set; the program information set further includes: an identifier of the preset functional component;
[0037] The configuration of the association relationship between different functional components and the synthesis of the generated functional components and the configured association relationship to obtain an executable target page program includes:
[0038] According to the identifier of the preset functional component in the program information set, obtaining the corresponding functional component from the preset functional component set;
[0039] For the generated functional components and the obtained functional components, the association relationship between different functional components is configured; the generated functional components, the obtained corresponding functional components and the configured association relationship are integrated to obtain an executable target page program.
[0040] Optionally, the preset functional component set includes: preset functional components sent by other devices.
[0041] Optionally, the method is applied to a server, and the preset component template set includes: component templates sent by other devices.
[0042] A page program development device, comprising:
[0043] An acquisition unit is used to acquire a program information set for describing a target page program; the program information set includes at least one component function information; any component function information corresponds to a function that the target page program needs to implement, and any component function information is used to describe: a functional component that implements a corresponding function;
[0044] A component unit, for determining a corresponding function for any component function information in the program information set, and selecting a component template for implementing the determined function from a preset component template set; any component template in the component template set contains a code for implementing the function; and filling in the selected component template according to the component function information to generate a functional component for implementing the determined function;
[0045] The synthesis unit is used to configure the association relationship between different functional components, and synthesize the generated functional components and the configured association relationship to obtain an executable target page program.
[0046] Optionally, the generated one or more functional components correspond to interface controls; the program information set further includes page layout information, and the page layout information includes: layout information of the functional components corresponding to the interface controls;
[0047] The integrated unit is used for:
[0048] For the generated functional components, a page is constructed according to the page layout information, and the layout of the interface controls corresponding to the functional components in the constructed page is set; the constructed page, the generated functional components and the configured association relationships are integrated to obtain an executable target page program.
[0049] Optionally, the functional components corresponding to the interface controls include: functional components to be displayed with page display requirements;
[0050] The integration unit is used to: set the layout of the interface controls corresponding to the functional components to be displayed in the constructed page;
[0051] The target page program is used to render a page during operation, and the rendered page includes: an interface control corresponding to the functional component to be displayed.
[0052] Optionally, the interface control corresponding to the generated functional component is determined according to component function information and / or page layout information.
[0053] Optionally, the layout information of the interface control includes at least one of the following: the position of the interface control in the page, the stacking relationship between the interface controls, and the display size limit of the interface control in the page.
[0054] Optionally, the preset component template set includes: a backend interaction component template; the backend interaction component template is used to implement data interaction with the backend;
[0055] The generated functional components include backend interaction components;
[0056] The target page program is used to perform data interaction with the backend through the backend interaction component during operation.
[0057] Optionally, the preset component template set includes: a trigger function component template; the trigger function component template is used to trigger the associated backend interaction component;
[0058] The generated functional components also include triggering functional components;
[0059] The target page program is used to trigger the associated backend interaction component to perform data interaction with the backend during operation by triggering the functional component when the corresponding interface control is triggered.
[0060] Optionally, the preset component template set includes: an input function component template; the input function component template is used to implement: obtaining data input for a corresponding interface control;
[0061] The generated functional components include an input functional component;
[0062] The target page program is used to obtain data input for the corresponding interface control through the input function component during operation.
[0063] Optionally, the preset component template set includes: an input function component template and a backend interaction component template; the input function component template is used to implement the function of obtaining input data of the corresponding interface control; the backend interaction component template is used to implement: data interaction with the backend according to the input data obtained by the associated input function component;
[0064] The generated functional components include input functional components and backend interaction components;
[0065] The target page program is used to obtain input data through the input function component during operation, and to perform data interaction with the backend through the backend interaction component according to the input data of the associated input function component.
[0066] Optionally, the preset component template set includes: a backend interaction component template and a result function component template; the backend interaction component template is used to implement data interaction with the backend; the result function component template is used to implement: rendering and displaying the data interaction results in the associated backend interaction component in the page;
[0067] The generated functional components include backend interaction components and result functional components;
[0068] The target page program is used to perform data interaction with the backend through the backend interaction component during operation, and to render and display the data interaction results in the associated backend interaction component in the page through the result function component.
[0069] Optionally, the association relationship between functional components is determined based on component function information.
[0070] Optionally, the program information set further includes page layout information; the page layout information includes associations between functional components;
[0071] The integration unit is used to configure the association relationship between different functional components according to the page layout information.
[0072] Optionally, the device is applied to a server, and the server stores a preset functional component set; the program information set further includes: an identifier of the preset functional component;
[0073] The integrated unit is used for:
[0074] According to the identifier of the preset functional component in the program information set, obtaining the corresponding functional component from the preset functional component set;
[0075] For the generated functional components and the obtained functional components, the association relationship between different functional components is configured; the generated functional components, the obtained corresponding functional components and the configured association relationship are integrated to obtain an executable target page program.
[0076] Optionally, the preset functional component set includes: preset functional components sent by other devices.
[0077] Optionally, the apparatus is applied to a server, and the preset component template set includes: component templates sent by other devices.
[0078] This technical solution can parse the program information set, select the corresponding component template and fill in the information to obtain the functional components used to implement the functions, and then integrate the functional components to obtain the page program, thereby reducing manual participation in the development process and using reusable component templates to reduce the difficulty of development, thereby improving the development efficiency of the page program.
[0079] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of this specification. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0081] Figure 1 It is a flow chart of a page program development method provided in an embodiment of this specification;
[0082] Figure 2 It is a schematic diagram of the principle of a page program running method provided in an embodiment of this specification;
[0083] Figure 3 It is a structural diagram of a page program development device provided in an embodiment of this specification;
[0084] Figure 4 It is a structural diagram of a device used to configure the method of the embodiment of this specification. DETAILED DESCRIPTION
[0085] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of this specification, the technical solutions in the embodiments of this specification will be described in detail below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field should belong to the scope of disclosure.
[0086] The collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in the technical solution of this disclosure shall comply with the provisions of relevant laws and regulations and shall not violate public order and good morals.
[0087] At present, web pages are widely used as an important interface for computer interaction. For example, data query, data submission, resource browsing, etc. are performed through web pages. Therefore, the implementation of various businesses requires the development of web page programs.
[0088] However, during the development process of page programs, due to various reasons, such as redundant codes, manual repetitive development, etc., the development efficiency is often low.
[0089] For example, page programs in different businesses may all need to provide query functions, but different business parties often ask different developers to develop them independently, resulting in the query functions in different page programs being repeatedly implemented in different ways, wasting development resources and reducing development efficiency.
[0090] In order to solve the above technical problems, the embodiments of this specification provide a page program development method.
[0091] In this method, in order to reduce manual participation, the specific code of the page program can be automatically built by the device through low-code development.
[0092] Furthermore, in order to improve development efficiency, components that can be reused and directly called can be pre-set during the development process, thereby facilitating development based on the components.
[0093] Furthermore, the low-code development method can specifically be to obtain the program information set input by the developer, parse it, determine the components indicated by the program information set, and configure the determined components accordingly to obtain a page program.
[0094] This method can develop page programs based on reusable components through low-code development, thereby improving the development efficiency of page programs.
[0095] A page program development method provided in an embodiment of this specification is explained in detail below in conjunction with the accompanying drawings.
[0096] like Figure 1 The figure is a flow chart of a page program development method provided in an embodiment of the present specification.
[0097] The method flow does not limit the execution subject, which can be any electronic device. Optionally, the execution subject can be a server, a terminal, a development side device, etc.
[0098] Among them, component templates for implementing page program functions can be pre-set, and the component templates can contain the implementation logic of the functions. Blank information to be filled can be set in these component templates to facilitate the subsequent filling of specific component information to implement the functions of specific page programs. For the convenience of description, the filled component template is called a functional component.
[0099] Specifically, the component template can be filled with the description information of the page program. The description information can be in the form of an information set, which contains the filling content for the component template, that is, the information used to describe the functional component. For the convenience of description, the description information is called a program information set, and the information used to describe the functional component is called component functional information.
[0100] The method flow may specifically include the following steps.
[0101] S101: Acquire a program information set for describing a target page program.
[0102] Among them, the program information set may include at least one component function information; any component function information corresponds to the function that the target page program needs to implement, and any component function information is used to describe: a functional component that implements the corresponding function.
[0103] S102: For any component function information in the program information set, determine the corresponding function, and select a component template for implementing the determined function from a preset component template set; fill in the selected component template according to the targeted component function information, and generate a functional component for implementing the determined function.
[0104] In the component template set, any component template may include a code for implementing a function. The component template may be selected by selecting a component template including a specified function code from the component template set, and the specified function code may be used to implement the determined function.
[0105] The component template in the process of this method can be used to realize functions, specifically by running the contained code to realize the corresponding functions. Of course, specifically, after filling in the component function information and generating the functional component, the code contained in the functional component can be run to realize the same function, thereby facilitating the realization of program functions by reusing component templates and improving development efficiency.
[0106] S103: configuring association relationships between different functional components, and synthesizing the generated functional components and the configured association relationships to obtain an executable target page program.
[0107] The target page program may be any page program. For the convenience of description, any page program to be developed is referred to as the target page program.
[0108] The above method process can parse the program information set, select the corresponding component template and fill in the information to obtain the functional components used to implement the functions, and then integrate the functional components to obtain the page program, thereby reducing manual participation in the development process and using reusable component templates to reduce the difficulty of development, thereby improving the development efficiency of the page program.
[0109] In addition, component templates can be easily adjusted and updated, and errors or failures in component templates can be easily detected, thus reducing the maintenance cost of the program.
[0110] The above method flow is explained in detail below.
[0111] 1. S101: Acquire a program information set for describing a target page program.
[0112] Regarding the target page program, the method flow is not limited to a specific form and content.
[0113] Optionally, the target page program to be developed may include a page, and may also include related functional logic, such as an input function, a query function, a submission function, and the like.
[0114] Optionally, a program information set may be used to describe the target page program to be developed, that is, the development requirements of the page program, for example, the layout of the page, the functional logic to be deployed, the association between controls and components, and so on.
[0115] This method does not limit the content, form and acquisition method of the program information set.
[0116] Regarding the content of the program information set, the program information set can be used to describe the page program, specifically, to describe the page to be rendered in the page program, the functional implementation of the page program, the combination of functional components in the page program, the parameter transmission relationship of the page program, etc. Therefore, the program information set can include the relevant configuration information of the target page program, etc., so as to facilitate the subsequent automatic construction of the program according to the program information set.
[0117] As for the form of the program information set, optionally, the program information set can be in the form of an intermediate language, and can specifically include information in the form of an intermediate language, such as a pseudocode form, so that it can be easily parsed and has good interpretability, which helps to lower the threshold for developers.
[0118] Optionally, the program information set may be in a custom language, as long as the subsequent operations can be performed by parsing the program information set, determining the component template and obtaining the functional component. The custom language can improve security.
[0119] Regarding the specific method of obtaining the program information set, optionally, the program information set input by the developer can be directly obtained, or it can be obtained from other devices, such as the client, or it can be obtained in the process of visual development and building a page program. The program information set generated.
[0120] For ease of understanding, in a specific embodiment, a page program may be developed based on visual development by dragging controls, configuring data, and other operations, thereby generating a program information set.
[0121] Taking query as an example, you can drag an input box, a query button, and a result display list to the page, and then configure an input function component for the input box, a trigger function component for the query button, and a result function component for the result display list, and further configure an additional query function component.
[0122] Afterwards, the above functions can be associated by connecting or configuring component identifiers, so that after the query button is clicked, the trigger function component can obtain the input data in the input box from the input function component and send it to the query function component, further triggering the query function component to query the input data, and then display the query results in the result display list.
[0123] In another specific example, the execution subject may be a server, which provides services for page program development. Furthermore, the server may obtain a program information set from the client, and execute the above method flow to obtain a corresponding page program.
[0124] Among them, the server can provide page program development services for different clients to improve development efficiency.
[0125] The process of this method does not limit the content of the program information set. In order to facilitate the development of subsequent functional components, the component function information in the program information set is further explained below.
[0126] In an optional embodiment, the functions that need to be implemented by the page program, such as a query function, an input function, a display function, etc., can be implemented and combined through components.
[0127] Optionally, the program information set may include at least one piece of component function information.
[0128] Optionally, any component function information may correspond to the function that the target page program needs to implement, and any component function information may be used to describe: a functional component that implements the corresponding function. The component function information may be used to describe relevant information of the functional component, such as configuration information, to facilitate subsequent generation and construction of the functional component.
[0129] Of course, since the program information set may include one or more component function information, optionally, each component function information in the program information set may correspond to a function that the target page program needs to implement, and thus may be further used to describe: a functional component that implements the corresponding function.
[0130] Optionally, different component function information may correspond to different functions, or different component function information may correspond to the same function.
[0131] This embodiment does not limit the form and content of the component function information.
[0132] Optionally, the component function information can be intermediate language data used to describe the functional component, which can specifically describe relevant information of the functional component, such as the implemented functions, whether it needs to be rendered and displayed on the page, the control information rendered and displayed on the page, the relationship with other functional components, etc.
[0133] Optionally, the component function information may be described in an intermediate language or in another custom language.
[0134] In another optional embodiment, the page program can also realize page rendering and interaction, so the program information set can also optionally include page layout information. The page layout information can be used to describe the page to be rendered, and specifically can describe the relevant information of the controls in the page.
[0135] This embodiment does not limit the form and content of the page layout information.
[0136] Optionally, the page layout information may include: layout information of controls; integrating the generated functional components to obtain an executable target page program, which may include: constructing a page according to the page layout information, and setting the layout of controls in the constructed page; integrating the constructed page and the generated functional components to obtain an executable target page program.
[0137] Optionally, the page layout information may be intermediate language data for describing the page layout, and may specifically describe layout information of controls in the page, for example, position information, stacking relationship, display size limitation, etc. of controls in the page.
[0138] Optionally, the page layout information may be described in an intermediate language or in another custom language.
[0139] 2. S102: For any component function information in the program information set, determine the corresponding function, and select a component template for implementing the determined function from a preset component template set; fill in the selected component template according to the targeted component function information, and generate a functional component for implementing the determined function.
[0140] The method flow does not limit how to generate functional components based on component functional information.
[0141] Optionally, a functional component may be generated for one or more pieces of component functional information in the program information set. Specifically, a functional component may be generated for each piece of component functional information in the program information set. For a specific method of generating a functional component, see S102 and its explanation.
[0142] The following is a detailed explanation of any component function information. It can be understood that the same method can be used to generate function components for other component function information in the program information set.
[0143] 1) The correspondence between component function information and functions.
[0144] Optionally, the component function information may correspond to the function that the target page program needs to implement, and the component function information may be used to describe the functional component that implements the corresponding function.
[0145] Among them, optionally, any component function information can correspond to the function that the target page program needs to implement, and any component function information can be used to describe the functional component that implements the corresponding function. Optionally, each component function information can correspond to the function that the target page program needs to implement, and each component function information can be used to describe the functional component that implements the corresponding function.
[0146] The method flow does not limit the form of the correspondence between component function information and functions.
[0147] Optionally, the component function information may include information of corresponding functions, so that the corresponding functions can be easily determined from the component function information and a component template for realizing the corresponding functions can be selected.
[0148] For example, the component function information may include an input function and specific information related to the input function, so that a component template for implementing the input function may be selected.
[0149] Optionally, the program information set may also include a correspondence between component function information and functions, thereby facilitating subsequent template selection.
[0150] 2) About component templates.
[0151] In an optional embodiment, component-based development may be implemented to improve development efficiency, and specific components may be created based on functions.
[0152] Optionally, component templates can be used for function implementation. Specifically, development and logic implementation can be performed in advance for functions that may need to be implemented in the page program, thereby facilitating the use of component templates for development in the process of building the page program and improving development efficiency.
[0153] Moreover, for different page programs that need to implement the same function, the component template that implements the same function can be used during the construction process, thereby realizing the reuse of the component template and improving development efficiency.
[0154] Therefore, component templates can be used in this method process to improve development efficiency.
[0155] The method flow does not limit the form of the component template, as long as it contains the code logic for function implementation.
[0156] In the component template set, any component template may include a code for implementing a function. The component template may be selected by selecting a component template including a specified function code from the component template set, and the specified function code may be used to implement the determined function.
[0157] The component template in the process of this method can be used to realize functions, specifically by running the contained code to realize the corresponding functions. Of course, specifically, after filling in the component function information and generating the functional component, the code contained in the functional component can be run to realize the same function, thereby facilitating the realization of program functions by reusing component templates and improving development efficiency.
[0158] Optionally, the function implementation logic may be determined as a component template, in which parameters to be filled in may be set, such as input field name, output field name, field name to be submitted, and the like.
[0159] For example, for input functions, a control is usually required on the page as an interface, and the input data in the control is obtained and assigned to the field. Therefore, the implementation logic of "obtaining input data in the control" can be determined as a component template for an input function, and the parameters that need to be filled in can be further set, including the control type, the assignment field name, etc.
[0160] This method does not limit the type of component templates, but can be differentiated based on the functions implemented.
[0161] Optionally, there may be component templates for implementing input functions, component templates for implementing trigger functions, component templates for implementing query functions, component templates for implementing interactive functions, component templates for implementing submission functions, component templates for implementing display functions, and so on.
[0162] The process of this method does not limit the source of the component template. Optionally, it can be developed by the developer himself or uploaded by other devices.
[0163] The method flow does not limit the number and type of component templates in the preset component template set.
[0164] Optionally, when the execution subject is a server, in order to increase the number and types of templates in the component template collection, component templates developed in other devices may be collected.
[0165] Optionally, the preset component template set may include: component templates sent by other devices. The other devices may specifically be other servers, or various clients corresponding to the servers, and so on.
[0166] 3) How functional components are generated.
[0167] The method flow does not limit the specific way of generating functional components.
[0168] Optionally, they can be combined into functional components based on component function information and with the aid of implementation logic for implementing corresponding functions.
[0169] Optionally, according to the component function information, a component template for realizing the corresponding function may be first selected, and then the selected component template may be filled in according to the component function information to generate a functional component for realizing the corresponding function.
[0170] The method flow does not limit the way of selecting the component template, as long as the component template used to implement the function corresponding to the component function information is selected.
[0171] Optionally, the program information set may include the correspondence between component function information and the functions to be implemented, and the preset component template set may include the correspondence between component templates and implemented functions, so that the component function information and component templates corresponding to the same function can be determined by matching the functions between the correspondences, and the determined component template can be selected.
[0172] Optionally, the component function information may include information of corresponding functions, and the preset component template set may include the correspondence between component templates and implemented functions, so that component function information and component templates corresponding to the same function can be determined, and the determined component template can be selected.
[0173] This method does not limit the way in which the component template is filled with information.
[0174] Optionally, the information to be filled in the selected component template can be obtained from the component function information, and the obtained information can be filled into the component template.
[0175] Specifically, in the component template, you can pre-set identifiers for the information to be filled in, such as input field name, output field name, etc. In the component function information, you can also set key-value pairs, with the identifier as the key and the specific information as the value, such as input field name-name, output field name-username, etc., so that you can easily fill in the information corresponding to the identifier according to the key-value pair.
[0176] Optionally, since the component template is pre-set, the component function information can also conform to a preset fixed format, so that the information to be filled in can be directly obtained from the component function information according to the fixed format and filled into the selected component template.
[0177] For example, the information that needs to be filled in the component template can be arranged in order and separated by semicolons as a preset fixed format. The specific format can be: input field name; output field name; query field name; query data source, etc. In the component function information, specific information can be set according to this fixed format, which is convenient for directly obtaining specific information according to this fixed format for filling. Specifically, it can be: name; username; age; userDatabase.
[0178] 4) Example of generating functional components.
[0179] To facilitate understanding, several examples of generating functional components are given below.
[0180] Example 1: Component function information used to implement input function.
[0181] The component function information may be in the format of fields and field values, which can be explained in the following table.
[0182]
[0183] The optional configuration items can be selected from the following table.
[0184]
[0185] Afterwards, a component template for implementing the input function may be selected based on the component function information.
[0186] The component template can be used to implement the input function, wherein the specific function implementation logic can be to set the display of the interface control on the page and store the input data of the interface control into the input data field.
[0187] The specific interface controls, display conditions, input data fields, etc. may be unfilled information, and thus the information may be filled in according to the above component function information to obtain an input function component.
[0188] Example 2: Component function information used to implement trigger functions.
[0189] The component function information may be in the format of fields and field values, which can be explained in the following table.
[0190]
[0191] The optional configuration items can be selected from the following table.
[0192]
[0193] The triggered callback function is not limited and can be selected from callback functions of different functions.
[0194] For example, obtaining input data in an input function component, triggering a query, or triggering a callback function for submission, etc.
[0195] Afterwards, a component template for implementing the trigger function may be selected based on the component function information.
[0196] The component template can be used to implement the trigger function, wherein the specific function implementation logic can be to set the display of the interface control on the page and trigger the execution of the callback function based on the interaction of the interface control.
[0197] The specific interface controls, display conditions, callback functions, etc. may be unfilled information, and thus the information may be filled in according to the above component function information to obtain a trigger function component.
[0198] Example 3: Component function information used to implement the query function.
[0199] The component function information may be in the format of fields and field values, which can be explained in the following table.
[0200]
[0201] Among them, the components for the query function may not be displayed on the page, so there is no need for interface controls.
[0202] The optional configuration items can be selected from the following table.
[0203]
[0204] Afterwards, a component template for implementing the query function may be selected based on the component function information.
[0205] The component template can be used to implement the query function, wherein the specific function implementation logic can be used to submit the query conditions to the query target (such as a database) and obtain the returned query results. Specifically, it can be implemented by two different functions.
[0206] The specific query conditions, query targets, query result storage fields, etc. may be unfilled information, so that the information may be filled in according to the above component function information to obtain a query function component.
[0207] Example 4: Component function information used to implement display functions.
[0208] The component function information may be in the format of fields and field values, which can be explained in the following table.
[0209]
[0210] The optional configuration items can be selected from the following table.
[0211]
[0212]
[0213] Afterwards, a component template for implementing the display function may be selected based on the component function information.
[0214] Component templates can be used to implement display functions, where the specific function implementation logic can be used to display the specified field data on the page through interface controls.
[0215] The specific designated fields, interface controls, etc. may be unfilled information, and thus the information may be filled in according to the above component function information to obtain a display function component.
[0216] The above four examples are only used for illustrative purposes and cannot limit the disclosure scope of the embodiments of this specification. Functional components for realizing interactive functions and the like can also be generated.
[0217] Moreover, a single functional component can also add additional functions. For example, for an input functional component, you can add input data format verification function, error feedback function, etc. in the component template to improve the richness and diversity of component functions. Of course, it can be specifically divided into input functional component templates with additional functions and input functional component templates without additional functions.
[0218] Based on the above examples, it can be understood that by combining functional components with different functions, it is easy to build page programs that meet different needs and improve development efficiency.
[0219] 3. S103: configuring association relationships between different functional components, and synthesizing the generated functional components and the configured association relationships to obtain an executable target page program.
[0220] The method flow does not limit the specific comprehensive functional components and the configured association relationships to obtain the target page program.
[0221] Optionally, since the functional components themselves can realize functions, the function components can be associated with each other to realize the transfer of parameters, so that a page program can be obtained to realize the corresponding functions.
[0222] Optionally, a page program usually needs to render a display page, so in addition to the functional components, an additional page object can be created for rendering, display and interaction, so that the page object, functional components and configured associations can be combined to obtain a page program.
[0223] In an optional embodiment, the page program may include the page object required for rendering and display. Of course, the page program may also further include the functional logic implemented by the page.
[0224] The following explains the construction of the page program from the perspectives of page display and functional logic.
[0225] 4. About page display.
[0226] In an optional embodiment, page display usually requires displaying the controls therein, such as text, buttons, images, input boxes, and the like.
[0227] Optionally, the display of the page can be set directly for the control. Specifically, the page layout information in the program information set can be used. The explanation of the page layout information can be found above.
[0228] Optionally, the program information set may also include page layout information; the page layout information may include: layout information of controls. Combining the generated functional components and the configured associations to obtain an executable target page program may include: constructing a page according to the page layout information and setting the layout of controls in the constructed page; combining the constructed page, the generated functional components and the configured associations to obtain an executable target page program.
[0229] In the page layout information, you can set the controls that need to be displayed on the page, as well as the specific layout information of the controls, such as control type, control position, control size, control color, control transparency, control stacking relationship, etc.
[0230] Optionally, the method flow generates functional components to realize component-based automatic development, thereby improving development efficiency. Correspondingly, the functional components can be displayed and interacted through interface controls.
[0231] For example, input functional components require interface controls to obtain input data, and display functional components require interface controls to display data.
[0232] Therefore, optionally, the generated one or more functional components may correspond to interface controls. The program information set may also include page layout information, which may include: layout information of interface controls corresponding to the functional components. Of course, the page layout information may also include layout information of other controls.
[0233] Optionally, integrating the generated functional components and the configured association relationships to obtain an executable target page program may include: constructing a page according to page layout information for the generated functional components, and setting the layout of interface controls corresponding to the functional components in the constructed page; and obtaining an executable target page program by integrating the constructed page, the generated functional components and the configured association relationships.
[0234] This embodiment can set the layout of controls in the page based on the program information set, thereby improving the integrity and flexibility of the page program.
[0235] Among them, the generated functional components may not require interface controls. For example, query functional components and interactive functional components only need to implement functions without obtaining or displaying data through pages.
[0236] Furthermore, even if the functional component corresponds to the interface control, it is not necessarily required to be displayed on the page. For example, the result display functional component can render the display interface control and display the query result only when the query result is obtained.
[0237] Therefore, optionally, functional components that currently have page display requirements can be distinguished.
[0238] Optionally, the functional components corresponding to the interface controls include: functional components to be displayed with page display requirements; setting the layout of the interface controls corresponding to the functional components in the constructed page may include: setting the layout of the interface controls corresponding to the functional components to be displayed in the constructed page; the target page program can be used to render the page during operation, and the rendered page includes: the interface controls corresponding to the functional components to be displayed.
[0239] This embodiment can determine the functional components to be displayed that have page display requirements, thereby improving the flexibility of page settings.
[0240] This method does not limit the way of determining the correspondence between functional components and interface controls.
[0241] Optionally, the interface control corresponding to the functional component may be determined according to the component function information. Specifically, the component function information may include information such as the type, size, color, transparency, etc. of the interface control corresponding to the component.
[0242] Optionally, the interface controls corresponding to the functional components may also be determined according to the page layout information, so that when determining the page layout, the type, size, color, transparency and other information of the interface controls may be comprehensively determined.
[0243] Of course, it can also be determined by combining component function information and page layout information. Specifically, the interface control type can be determined by the component function information, and the position, size, color, transparency and other information of the interface control can be determined by the page layout information.
[0244] Therefore, optionally, the interface control corresponding to the generated functional component is determined according to the component function information and / or the page layout information.
[0245] This embodiment can determine the interface control corresponding to the functional component through the program information set, thereby improving the setting freedom of the program information set, facilitating the setting of the interface control, and thus improving the flexibility of page display.
[0246] In addition, the method flow does not limit the form and content of the page layout information, nor does it limit the form and content of the layout information of the interface control.
[0247] Optionally, the layout information of the interface control may be in an intermediate language or a custom language.
[0248] Optionally, the layout information of the interface control may include at least one of the following: the position of the interface control in the page, the size of the interface control in the page, the stacking relationship between the interface controls, and the display size limit of the interface control in the page.
[0249] The stacking relationship between the interface controls can be used to determine the occlusion situation when different interface controls are displayed overlappingly on the page.
[0250] The display size limit of the interface control in the page can specifically be to set a size limit for the interface control whose size is difficult to determine, so as to improve the stability of the page layout.
[0251] 5. About functional logic.
[0252] In an optional embodiment, the page program can also realize multiple functions, such as input function, display function, query function, submission function, etc.
[0253] In order to complete the complete functional implementation process of the page program, based on the generated functional components, it is also necessary to associate the functional components and set the parameter transfer relationship to build a complete page program.
[0254] For example, the query function needs to provide query conditions and query targets, and also needs to display query results. Therefore, it is necessary to use the input function to obtain the query conditions and query targets, specifically, to obtain the query fields and query databases input by the user. The query function can send the query fields to the query database, and then obtain the query results returned by the query database, and then use the display function to display the query results on the page, completing a complete query process.
[0255] Therefore, in the process of building a page program, the association between functional components can be set.
[0256] Of course, the method flow is not limited to a specific association form, which may be a data transmission interface between functional components, a parameter transfer between functional components, or a data variable shared between functional components.
[0257] For ease of understanding, this specification provides 5 embodiments. It is understood that the following 5 embodiments are only used for illustrative purposes and cannot limit the scope of this specification, and the following 5 embodiments can be combined with each other.
[0258] 1) Embodiment 1.
[0259] Optionally, the preset component template set may include: a backend interaction component template; the backend interaction component template may be used to implement data interaction with the backend. The generated functional component may include a backend interaction component.
[0260] This embodiment does not limit the specific form of backend interaction, which may be the backend querying data, submitting data to the backend, or receiving data sent by the backend.
[0261] Optionally, the target page program can be used to perform data interaction with the backend through the backend interaction component during operation.
[0262] This embodiment does not limit the form and number of specific backend interaction components, nor does it limit the backends to be interacted with, nor does it limit the form of data interaction.
[0263] Optionally, data interaction with the backend may include sending data to the backend and / or obtaining data from the backend.
[0264] In a specific example, the page program can obtain real-time updated data from the backend (eg, the server corresponding to the page) through the backend interactive component, specifically weather data, date data, etc. on the page.
[0265] This embodiment can improve the integrity of page program functions through backend interaction components.
[0266] 2) Embodiment 2.
[0267] When a backend interaction component is generated, a functional component that triggers the backend interaction may be further set.
[0268] Therefore, optionally, the preset component template set may include: a trigger function component template; the trigger function component template may be used to trigger the associated backend interaction component.
[0269] Among them, the trigger function component template can set a place for information to be filled, that is, the associated backend interaction component. Specifically, one or more backend interaction components can be filled, and the specific content filled can be the identifier or related data of the backend interaction component to facilitate triggering.
[0270] The filled backend interaction component can be determined as the backend interaction component associated with the triggering function component.
[0271] Optionally, the generated functional component may also include a triggering functional component; the target page program may be used to trigger the associated backend interaction component to perform data interaction with the backend during operation by triggering the functional component when the corresponding interface control is triggered.
[0272] The interface control corresponding to the trigger function component may be a button, and specifically, when the button is clicked, the associated backend interaction component is triggered to perform data interaction with the backend.
[0273] In a specific example, a query button can be set as an interface control corresponding to the trigger function component. This trigger function component can be associated with a backend interaction component of a query function, and then when the query button is clicked, the associated backend interaction component can be triggered to perform a query.
[0274] This embodiment can improve the integrity of the page program function by setting a trigger function component of the backend interaction component.
[0275] 3) Embodiment 3.
[0276] The page program can also have an input function, which can obtain the user input data through user interaction to facilitate subsequent business execution.
[0277] Therefore, optionally, the preset component template set may include: an input function component template; the input function component template may be used to implement: obtaining data input for a corresponding interface control. The generated function component may include an input function component; the target page program may be used to obtain data input for a corresponding interface control through the input function component during operation.
[0278] Among them, the input data obtained by the input function component can be used for subsequent various business executions, such as the query conditions required by the query function, the submission data required by the submission function, etc.
[0279] In a specific example, a selector may be provided so that the user can select the database to be queried and the database field to be queried, and an input box may be provided so that the user can input the value of the database field to facilitate the query.
[0280] This embodiment can obtain input data by setting an input function component, thereby facilitating the execution of subsequent services and improving the integrity of the page program function.
[0281] 4) Embodiment 4.
[0282] Based on the above analysis, the input function and the backend interaction function can be associated.
[0283] Optionally, the preset component template set may include: input function component template and back-end interaction component template; the input function component template can be used to implement the function of obtaining the input data of the corresponding interface control; the back-end interaction component template can be used to implement: data interaction with the back-end based on the input data obtained by the associated input function component.
[0284] Among them, in the backend interaction component template, the information to be filled, that is, the associated input function component, can be set. In the process of generating the backend interaction component, the information of the input function component can be filled in, and the filled input function component can be determined as the associated input function component.
[0285] The specific filled information may be the identifier of the input function component or the input field name in the input function component.
[0286] Optionally, the generated functional components may include an input functional component and a backend interaction component. The target page program may be used to obtain input data through the input functional component during operation, and to perform data interaction with the backend through the backend interaction component according to the input data of the associated input functional component.
[0287] In a specific example, the query or submission may be performed using input data of an input function component.
[0288] This embodiment can obtain input data through the input function component for back-end data interaction, facilitate the execution of subsequent business, and improve the integrity of the page program function.
[0289] Of course, based on the above-mentioned embodiment 2, the trigger function component can also obtain the input data of the associated input function component, and then send the obtained input data to the associated backend interaction component, and the associated backend interaction component can interact with the backend according to the input data.
[0290] 5) Embodiment 5.
[0291] The results of backend interactions can also be rendered and displayed on the page. For example, for the query function, the query results can be displayed on the page list.
[0292] Optionally, the preset component template set may include: a backend interaction component template and a result function component template; the backend interaction component template can be used to implement data interaction with the backend; the result function component template can be used to implement: rendering and displaying the data interaction results in the associated backend interaction component in the page.
[0293] Optionally, the generated functional components may include a backend interaction component and a result functional component; the target page program may be used to interact with the backend for data through the backend interaction component during operation, and to render and display the data interaction results in the associated backend interaction component in the page through the result functional component.
[0294] This embodiment does not limit the specific data interaction results, which may be query results, submission results, results of data sent from the backend, etc.
[0295] In a specific example, the query results in the backend interactive component can be displayed on the page by the associated result function component. Specifically, the field names and field values in the query results can be displayed in a list.
[0296] This embodiment can display the backend interaction results through the result function component, thereby improving the integrity of the page program function.
[0297] In addition, the above five embodiments can be used for illustrative purposes, and other embodiments can be obtained through simple reasoning or combination, and they cannot limit the disclosure scope of this specification.
[0298] 6. Regarding the relationship between functional components.
[0299] The method flow does not limit the form and setting method of the association relationship between functional components.
[0300] Optionally, the association relationship between the functional components may be in the form of a data interaction relationship between the functional components, a data transmission interface between the functional components, or a parameter transfer relationship between the functional components.
[0301] Optionally, the association relationship of the functional components can be specifically set. The association relationship of the components to be filled in can be set in the component template to facilitate subsequent filling of information for setting; or the association relationship between the functional components can be additionally set through the page program.
[0302] The specific association relationship of the functional components, for example, one functional component is associated with multiple functional components, etc., can be determined through a program information set, and can be determined specifically through the functional information of each component and / or page layout information.
[0303] The component function information may include the association relationship between the functional components, so as to facilitate information filling. The page layout information may also include the association relationship between the functional components, so as to facilitate unified setting for the generated functional components. Of course, it may also be determined by combining the component function information and the page layout information.
[0304] Therefore, optionally, the association relationship between functional components can be determined based on component function information and / or page layout information.
[0305] In an optional embodiment, the manner of obtaining the page program by synthesizing the generated functional components and the configured association relationships may not be limited.
[0306] Optionally, a page may be constructed for the generated functional components, and associations between the functional components may be set, thereby obtaining an executable page program having corresponding functions.
[0307] Optionally, the program information set may also include page layout information; the page layout information may include associations between functional components; configuring the associations between different functional components may include: configuring the associations between different functional components according to the page layout information.
[0308] Optionally, the program information set may also include page layout information; the page layout information may include: layout information of interface controls corresponding to functional components, and associations between functional components. Configuring associations between different functional components, and synthesizing the generated functional components and the configured associations to obtain an executable target page program may include: constructing a page according to the page layout information for the generated functional components, setting the layout of interface controls corresponding to the functional components in the constructed page, and configuring associations between different functional components; and synthesizing the constructed page, the generated functional components, and the configured associations to obtain an executable target page program.
[0309] This embodiment can improve the integrity of page program functions and improve the development efficiency of page programs.
[0310] This method of obtaining the target page program can be implemented by a preset logic in the execution body. The preset logic can be specifically configured automatically for the input page, functional components and functional component associations to obtain an executable target page program.
[0311] This preset logic can be reused or called to improve development efficiency and reduce development costs.
[0312] 7. The generation and running process of the sample page program.
[0313] For ease of understanding, this specification also provides an application embodiment for explaining the generation process and operation process of the page program.
[0314] 1) The generation process of page program.
[0315] In a specific application embodiment, a specific service platform may be used to provide page program development services, specifically a React-report-page platform.
[0316] The service platform may store a preset component template set, a preset control set, a preset program information set parsing logic, a preset logic for building a target page program, and the like.
[0317] The service platform can be deployed on a terminal or a server. This embodiment is not limited.
[0318] The service platform may receive a program information set describing a target page program; the program information set may include at least one component function information, and then the service platform may generate a functional component according to the component function information.
[0319] Specifically, the following functional components can be generated: an input functional component, a trigger functional component, a query functional component and a display functional component.
[0320] Furthermore, the service platform can construct a page, set the size and position of the input box corresponding to the input function component, the size and position of the query button corresponding to the trigger function component, and the size and position of the list corresponding to the display function component. The initial page can only render the input box and the query button.
[0321] The service platform can then set a trigger function component to send the input data in the input box of the input function component to the query function component for backend query when the corresponding button is clicked. The query function component can be used to send the query results to the display function component for display, specifically, in the corresponding list.
[0322] Finally, the service platform can package the page, four functional components, and the associations between the functional components into an executable page program.
[0323] 2) The running process of the page program.
[0324] The page program may specifically include an input function component, a trigger function component, a query function component and a display function component.
[0325] For ease of understanding, Figure 2 The figure is a schematic diagram of the principle of a page program running method provided in an embodiment of this specification.
[0326] The page program may include a page object, an input function component, a trigger function component, a query function component and a display function component.
[0327] Page objects can include input boxes, query buttons, and lists.
[0328] Page objects can interact with users, enter data into input boxes, and click buttons.
[0329] The page object can trigger execution in response to a button click operation: send trigger information to the trigger function component, so that the trigger function component requests the input function component to obtain input data, and when the input data is obtained, the input data can be returned to the page object, and the page object can be triggered to execute a query. The page object can send the input data to the query function component to trigger the query function of the query function component.
[0330] Of course, the trigger function component can also be sent directly to the query function component to trigger the query function of the query function component.
[0331] After that, the query function component can interact with the backend to implement data query, obtain data query results, return the data query results to the page object, and trigger the page object to render and display.
[0332] Specifically, the page object can determine the display function component corresponding to the query result, send the query result to the display function component, and the display function component renders and displays it. Specifically, the query result can be displayed in a list.
[0333] Of course, the query function component can also directly return the data query results to the corresponding display function component to render and display the query results.
[0334] 8. Server side.
[0335] In an optional embodiment, the execution subject may be a server, so as to meet different page program development requirements and improve the development efficiency of the page program.
[0336] When the execution subject is the server, on the one hand, it is convenient to obtain preset component templates or functional components, and on the other hand, it can reuse component templates, components and implementation logic more, improve development efficiency and reduce development costs.
[0337] Optionally, the server may store functional components, which can be directly applied to meet the development needs of the same user without filling in the components.
[0338] Therefore, optionally, the method flow may be applied to a server, and the server may store a preset functional component set; the program information set may also include: an identifier of the preset functional component.
[0339] Configuring the association relationship between different functional components, and synthesizing the generated functional components and the configured association relationship to obtain an executable target page program, can be: according to the identifier of the preset functional component in the program information set, obtaining the corresponding functional component from the preset functional component set; for the generated functional component and the obtained functional component, configuring the association relationship between different functional components; synthesizing the generated functional component, the obtained corresponding functional component and the configured association relationship to obtain an executable target page program.
[0340] Optionally, the preset function component set may include: preset function components sent by other devices, specifically preset function components sent by other clients or other servers.
[0341] In addition, optionally, the method flow can be applied to the server, and the preset component template set can include: component templates sent by other devices, specifically component templates sent by other clients or other servers.
[0342] This embodiment can improve the development efficiency of the page program and reduce the development cost of the page program based on the server-side shared component template and the construction logic of the page program.
[0343] like Figure 3 The figure is a schematic diagram of the structure of a page program development device provided in an embodiment of this specification.
[0344] This embodiment does not limit the execution subject, which may specifically be a terminal or a server.
[0345] The apparatus may include the following units.
[0346] The acquisition unit 301 is used to acquire a program information set for describing the target page program; the program information set includes at least one component function information; any component function information corresponds to the function that the target page program needs to implement, and any component function information is used to describe: a functional component that implements the corresponding function;
[0347] The component unit 302 is used to determine the corresponding function for any component function information in the program information set, and select a component template for implementing the determined function from a preset component template set; in the component template set, any component template contains a code for implementing the function; according to the component function information, fill the selected component template to generate a functional component for implementing the determined function;
[0348] The integration unit 303 is used to configure the association relationship between different functional components, and integrate the generated functional components and the configured association relationship to obtain an executable target page program.
[0349] Optionally, the generated one or more functional components correspond to interface controls; the program information set also includes page layout information, and the page layout information includes: layout information of the interface controls corresponding to the functional components;
[0350] The integrated unit 303 is used for:
[0351] For the generated functional components, a page is constructed according to the page layout information, and the layout of the interface controls corresponding to the functional components in the constructed page is set; the constructed page, the generated functional components and the configured association relationships are integrated to obtain an executable target page program.
[0352] Optionally, the functional components corresponding to the interface controls include: functional components to be displayed that have page display requirements;
[0353] The integration unit 303 is used to: set the layout of the interface controls corresponding to the functional components to be displayed in the constructed page;
[0354] The target page program is used to render the page during operation, and the rendered page includes: the interface controls corresponding to the functional components to be displayed.
[0355] Optionally, the interface control corresponding to the generated functional component is determined according to component function information and / or page layout information.
[0356] Optionally, the layout information of the interface control includes at least one of the following: the position of the interface control in the page, the stacking relationship between the interface controls, and the display size limit of the interface control in the page.
[0357] Optionally, the preset component template set includes: a backend interaction component template; the backend interaction component template is used to implement data interaction with the backend;
[0358] The generated functional components include backend interaction components;
[0359] The target page program is used to interact with the backend through the backend interaction component during operation.
[0360] Optionally, the preset component template set includes: a trigger function component template; the trigger function component template is used to trigger the associated backend interaction component;
[0361] The generated functional components also include triggering functional components;
[0362] The target page program is used to trigger the associated backend interaction component to interact with the backend for data when the corresponding interface control is triggered by triggering the function component during operation.
[0363] Optionally, the preset component template set includes: an input function component template; the input function component template is used to implement: obtaining data input for a corresponding interface control;
[0364] The generated functional components include an input functional component;
[0365] The target page program is used to obtain the data input for the corresponding interface control through the input function component during operation.
[0366] Optionally, the preset component template set includes: an input function component template and a backend interaction component template; the input function component template is used to implement the function of obtaining the input data of the corresponding interface control; the backend interaction component template is used to implement: data interaction with the backend according to the input data obtained by the associated input function component;
[0367] The generated functional components include input functional components and backend interaction components;
[0368] The target page program is used to obtain input data through the input function component during operation, and to interact with the backend through the backend interaction component according to the input data of the associated input function component.
[0369] Optionally, the preset component template set includes: a backend interaction component template and a result function component template; the backend interaction component template is used to implement data interaction with the backend; the result function component template is used to implement: rendering and displaying the data interaction results in the associated backend interaction component in the page;
[0370] The generated functional components include backend interaction components and result functional components;
[0371] The target page program is used to interact with the backend through the backend interaction component during operation, and to render and display the data interaction results in the associated backend interaction component on the page through the result function component.
[0372] Optionally, the association relationship between functional components is determined based on component function information.
[0373] Optionally, the program information set also includes page layout information; the page layout information includes associations between functional components;
[0374] The integrated unit 303 is used for:
[0375] Configure the association relationship between different functional components according to the page layout information.
[0376] Optionally, the above device can be applied to a server, which stores a preset functional component set; the program information set also includes: an identifier of the preset functional component;
[0377] The integrated unit 303 is used for:
[0378] According to the identifier of the preset functional component in the program information set, obtaining the corresponding functional component from the preset functional component set;
[0379] For the generated functional components and the obtained functional components, the association relationship between different functional components is configured; the generated functional components, the obtained corresponding functional components and the configured association relationship are integrated to obtain an executable target page program.
[0380] Optionally, the preset functional component set includes: preset functional components sent by other devices.
[0381] Optionally, the above apparatus may be applied to a server, and the preset component template set includes: component templates sent by other devices.
[0382] The explanation of the above device embodiment can refer to the above method embodiment.
[0383] An embodiment of the present specification also provides an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement any of the above method embodiments.
[0384] The embodiments of this specification also provide a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can implement any of the above method embodiments.
[0385] The embodiments of the present specification also provide a computer device, which at least includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein a page program development method is implemented when the processor executes the program.
[0386] Figure 4 A more specific hardware structure diagram of a computer device provided in an embodiment of this specification is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0387] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0388] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0389] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0390] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0391] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0392] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0393] The embodiments of the present specification also provide a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, a page program development method is implemented.
[0394] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0395] It can be known from the above description of the implementation mode that the technicians in this field can clearly understand that the embodiments of this specification can be implemented by means of software plus the necessary general hardware platform. Based on such an understanding, the technical solution of the embodiments of this specification can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments of this specification.
[0396] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.
[0397] Each embodiment in this specification is described in a progressive manner, and the same and 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. The device embodiment described above is merely schematic, wherein the modules described as separate components may or may not be physically separated, and the functions of each module can be implemented in the same one or more software and / or hardware when implementing the embodiment scheme of this specification. It is also possible to select some or all of the modules according to actual needs to achieve the purpose of the embodiment scheme. A person of ordinary skill in the art can understand and implement it without paying creative labor.
[0398] The above is only a specific implementation of the embodiments of this specification. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the embodiments of this specification. These improvements and modifications should also be regarded as protection for the embodiments of this specification.
Claims
1. A page program development method, It is characterized in that include: Acquire a program information set for describing a target page program; the program information set includes at least one component function information; any component function information corresponds to a function that the target page program needs to implement, and any component function information is used to describe: a functional component that implements a corresponding function; For any component function information in the program information set, determine the corresponding function, and select a component template for implementing the determined function from a preset component template set; in the component template set, any component template contains a code for implementing the function; according to the component function information, fill in the selected component template to generate a functional component for implementing the determined function; The association relationship between different functional components is configured, and the generated functional components and the configured association relationship are integrated to obtain an executable target page program.
2. The method according to claim 1, It is characterized in that The generated one or more functional components correspond to interface controls; the program information set also includes page layout information, and the page layout information includes: layout information of the functional components corresponding to the interface controls; The generated functional components and configured association relationships are synthesized to obtain an executable target page program, including: For the generated functional components, a page is constructed according to the page layout information, and the layout of the interface controls corresponding to the functional components in the constructed page is set; the constructed page, the generated functional components and the configured association relationships are integrated to obtain an executable target page program.
3. The method according to claim 2, It is characterized in that The functional components corresponding to the interface controls include: functional components to be displayed with page display requirements; The step of setting the layout of the interface controls corresponding to the functional components in the constructed page includes: setting the layout of the interface controls corresponding to the functional components to be displayed in the constructed page; The target page program is used to render a page during operation, and the rendered page includes: an interface control corresponding to the functional component to be displayed.
4. The method according to claim 2, It is characterized in that The interface controls corresponding to the generated functional components are determined according to the component function information and / or the page layout information.
5. The method according to claim 2, It is characterized in that The layout information of the interface controls includes at least one of the following: the position of the interface controls in the page, the stacking relationship between the interface controls, and the display size limit of the interface controls in the page.
6. The method according to claim 1, It is characterized in that The preset component template set includes: a backend interaction component template; the backend interaction component template is used to implement data interaction with the backend; The generated functional components include backend interaction components; The target page program is used to perform data interaction with the backend through the backend interaction component during operation.
7. The method according to claim 6, It is characterized in that The preset component template set includes: a trigger function component template; the trigger function component template is used to trigger the associated backend interaction component; The generated functional components also include triggering functional components; The target page program is used to trigger the associated backend interaction component to perform data interaction with the backend during operation by triggering the functional component when the corresponding interface control is triggered.
8. The method according to claim 1, It is characterized in that The preset component template set includes: a backend interaction component template and a result function component template; the backend interaction component template is used to realize data interaction with the backend; the result function component template is used to realize: rendering and displaying the data interaction results in the associated backend interaction component in the page; The generated functional components include backend interaction components and result functional components; The target page program is used to perform data interaction with the backend through the backend interaction component during operation, and to render and display the data interaction results in the associated backend interaction component in the page through the result function component.
9. The method according to any one of claims 1 to 8, It is characterized in that The program information set also includes page layout information; the page layout information includes the association relationship between functional components; The configuration of the association relationship between different functional components includes: According to the page layout information, the association relationship between different functional components is configured.
10. The method according to claim 1, It is characterized in that The method is applied to a server, and the server stores a preset functional component set; the program information set also includes: an identifier of the preset functional component; The configuration of the association relationship between different functional components and the synthesis of the generated functional components and the configured association relationship to obtain an executable target page program includes: According to the identifier of the preset functional component in the program information set, obtaining the corresponding functional component from the preset functional component set; For the generated functional components and the obtained functional components, the association relationship between different functional components is configured; the generated functional components, the obtained corresponding functional components and the configured association relationship are integrated to obtain an executable target page program.
11. The method according to claim 10, It is characterized in that The preset functional component set includes: preset functional components sent by other devices.
12. The method according to claim 1, It is characterized in that The method is applied to a server, and the preset component template set includes: component templates sent by other devices.
13. A web page program development device, It is characterized in that include: An acquisition unit is used to acquire a program information set for describing a target page program; the program information set includes at least one component function information; any component function information corresponds to a function that the target page program needs to implement, and any component function information is used to describe: a functional component that implements a corresponding function; A component unit, for determining a corresponding function for any component function information in the program information set, and selecting a component template for implementing the determined function from a preset component template set; any component template in the component template set contains a code for implementing the function; and filling in the selected component template according to the component function information to generate a functional component for implementing the determined function; The synthesis unit is used to configure the association relationship between different functional components, and synthesize the generated functional components and the configured association relationship to obtain an executable target page program.
14. An electronic device, It is characterized in that include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 12.
15. A computer-readable storage medium, It is characterized in that When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to implement the method as claimed in any one of claims 1 to 12.
