Disclosure of Invention
The embodiment of the application provides a component management method, equipment and a medium, which are used for solving the following technical problems: the prior art is difficult to systematically and standardize the management of a plurality of components.
The embodiment of the application adopts the following technical scheme:
the embodiment of the application provides a component management method. Acquiring a keyword searching instruction sent by a user, and searching a preset component corresponding to the keyword in a component management library according to the keyword; the component management library comprises a plurality of preset components; determining a configuration file corresponding to the preset component according to the type of the preset component, and determining a subclass corresponding to the preset component in the configuration file; calling a component expansion interface according to the subclass corresponding to the preset component to acquire the self-defined structure content corresponding to the preset component; wherein the custom structure content is the component content associated with the current project; and realizing the function corresponding to the current project based on the self-defined structure content.
According to the method and the device, the preset component is obtained, the component which is developed by a developer in a later period and accords with the current project function can be stored, so that the current project requirement can be met, the component can be reused in similar projects, and the development process is reduced. Secondly, the component meeting the requirement is searched through the keywords, and the self-defined structure content corresponding to the preset component is obtained through calling the component expansion interface, so that the specific function in the current project is realized. Not only can effectively integrate component resources to standardize and systematize component development, but also can fully realize sharing and multiplexing of component codes.
In an implementation manner of the present application, according to a type of a preset component, a configuration file corresponding to the preset component is determined, and a subclass corresponding to the preset component is determined in the configuration file, which specifically includes: comparing the type of the preset component with the types in the plurality of configuration files to determine the configuration file matched with the type of the preset component; determining a logic subclass and a structure subclass corresponding to the preset component according to the configuration file; and the configuration files corresponding to the components of the same type are the same.
In an implementation manner of the present application, the component extension interface is called according to a subclass corresponding to a preset component to obtain a custom structure content corresponding to the preset component, which specifically includes: determining the implementation of an expansion interface corresponding to a preset component according to the logic subclass corresponding to the component; determining the self-defined structure content in the preset member according to the structure subclass corresponding to the preset member; and calling a component expansion interface through the expansion interface to acquire the custom structure content corresponding to the current project.
In an implementation manner of the present application, before finding a preset component corresponding to a keyword in a component management library, the method further includes: acquiring a component structure description file corresponding to a component management library, and acquiring component information description based on the component structure description file; the component information description at least comprises one or more of component numbers, component names, component types, component versions, belonging class names, method names, return values, parameter lists, description information and component contents; and acquiring the component implementation expansion interface so as to acquire, store and serialize the component content through the component implementation expansion interface.
In an implementation manner of the present application, before finding a preset component corresponding to a keyword in a component management library, the method further includes: and maintaining and managing the obtained preset components based on the component management library.
The embodiment of the application realizes resource sharing and multiplexing of public logic by providing the component uploading and downloading functions. And based on the construction management library, the uploaded components can be maintained and managed so as to update the components in real time, and the components can better meet project requirements. In addition, data analysis is carried out on the components, and the hot components are pushed to the user, so that the user is helped to select the proper components, and the use experience of the user is improved.
In an implementation manner of the present application, performing maintenance management on an obtained preset component specifically includes: receiving a component upgrading instruction to upgrade a component corresponding to the instruction, and displaying the upgraded component with the latest version to a user; and receiving a component expiration instruction, updating the state of the component corresponding to the instruction into an expired state, and displaying the expired component to the user.
In an implementation manner of the present application, before finding a preset component corresponding to the keyword in a component management library, the method further includes: monitoring and analyzing the use data of the component in real time; the use data at least comprises one or more items of inquiry times, browsing times and downloading times of the user on the component; counting the use feedback information corresponding to the component; wherein the use feedback information at least comprises one or more items of the comment data and the number of praise of the user to the component; and sorting the components according to the use data and the use feedback information to select the hot components and preferentially push the hot components to the user.
In an implementation manner of the present application, before determining a configuration file corresponding to a preset component according to a type of the preset component, the method further includes: determining characteristic information of the component according to the developed data information corresponding to the component; the characteristic information at least comprises one or more of component type, functional characteristics and industry field; and uploading the component and the characteristic information corresponding to the component to a component management library so as to determine the preset component of the corresponding type according to the instruction input by the user.
An embodiment of the present application provides a component management apparatus, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to: acquiring a keyword searching instruction sent by a user, and searching a preset component corresponding to the keyword in a component management library according to the keyword; the component management library comprises a plurality of preset components; determining a configuration file corresponding to the preset component according to the type of the preset component, and determining a subclass corresponding to the preset component in the configuration file; calling a component expansion interface according to the subclass corresponding to the preset component to acquire the self-defined structure content corresponding to the preset component; wherein the custom structure content is the component content associated with the current project; and realizing the function corresponding to the current project based on the self-defined structure content.
A non-volatile computer storage medium provided in an embodiment of the present application stores computer-executable instructions, and the computer-executable instructions are configured to: acquiring a keyword searching instruction sent by a user, and searching a preset component corresponding to the keyword in a component management library according to the keyword; the component management library comprises a plurality of preset components; determining a configuration file corresponding to the preset component according to the type of the preset component, and determining a subclass corresponding to the preset component in the configuration file; calling a component expansion interface according to the subclass corresponding to the preset component to acquire the self-defined structure content corresponding to the preset component; wherein the custom structure content is the component content associated with the current project; and realizing the function corresponding to the current project based on the self-defined structure content.
The embodiment of the application adopts at least one technical scheme which can achieve the following beneficial effects: according to the method and the device, the preset component is obtained, the component which is developed by a developer in a later period and accords with the current project function can be stored, so that the current project requirement can be met, the component can be reused in similar projects, and the development process is reduced. Secondly, the component meeting the requirement is searched through the keywords, and the self-defined structure content corresponding to the preset component is obtained through calling the component expansion interface, so that the specific function in the current project is realized. Not only can effectively integrate component resources to standardize and systematize component development, but also can fully realize sharing and multiplexing of component codes.
Detailed Description
The embodiment of the application provides a component management method, equipment and medium.
In order to make those skilled in the art better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any inventive step based on the embodiments of the present disclosure, shall fall within the scope of protection of the present application.
As a new trend of current software Development, a Low-Code Development Platform (LCDP) is a Development Platform that can quickly generate an application without coding or with a small amount of Code. In application, more than ten components are usually involved to complete a relatively complicated project development. For example, the water business system of city a develops the water arrears payment notification function, which also needs to be developed in the water business system of city B. The same function is realized in different projects, and the function requirements are consistent. Because different projects are realized by different developments, the final logic implementation is two sets.
In addition, when a developer searches for the component, the component is not convenient to search, the component content is not systematic, and omission is easily caused. Therefore, it is difficult to systematically and standardize the management of a large number of components existing in a low-code development platform in the prior art.
In order to solve the above problem, embodiments of the present application provide a component management method, device, and medium. The preset component is obtained, so that the component which is developed by a developer in a later period and accords with the current project function can be stored, the current project requirement can be met, the component can be reused in similar projects, and the development process is reduced. Secondly, the component meeting the requirement is searched through the keywords, and the self-defined structure content corresponding to the preset component is obtained through calling the component expansion interface, so that the specific function in the current project is realized. Not only can effectively integrate component resources to standardize and systematize component development, but also can fully realize sharing and multiplexing of component codes.
The technical solutions proposed in the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a flowchart of a component management method according to an embodiment of the present application. As shown in fig. 1, the component management method includes the steps of:
s101, the component management equipment obtains a keyword searching instruction sent by a user, and searches a preset component corresponding to the keyword in a component management library according to the keyword. The component management library comprises a plurality of preset components.
In one embodiment of the application, the component management device acquires a component structure description file corresponding to a component management library, and acquires a component information description based on the component structure description file. And acquiring the component implementation expansion interface so as to acquire, store and serialize the component content through the component implementation expansion interface.
Specifically, a general component structure description file is defined in advance for the component management library. This document provides a basic building block information description. The description of the component information at least includes one or more items of a component number, a component name, a component type, a component version, a belonging class name, a method name, a return value type, a parameter list, description information, component contents, and whether the component is overdue, and specifically, refer to a description table of a general component structure description file shown in table 1.
Attribute name
|
Means of
|
CompCode
|
The components are numbered.
|
CompName
|
Name of the component.
|
CompType
|
The type of component.
|
CompVersion
|
Component versions.
|
ClassName
|
The name of the class. For recording the class in which the corresponding code of the component is located.
|
MethodName
|
The name of the method. For recording the corresponding method name of the component.
|
ReturnType
|
The value type is returned. The type of the method return value is recorded.
|
ParamList
|
A list of parameters. For recording information such as the encoding, type, etc. of the parameters.
|
Note
|
Information is described. For the purpose, characteristics, etc. of the recording member.
|
Content
|
The contents of the components. The method is used for recording the custom content of different kinds of components.
|
Enable
|
If it is expired. |
TABLE 1
As shown in table 1, the general component structure description file includes a plurality of attributes, and different components can be determined according to different attributes, so that components meeting the requirements of the current project can be accurately found. The self-defined content based on the current project requirement is written into the component content, so that the self-defined content is called through the component expansion interface.
For example, a class describing a type may be encapsulated for return values and parameter types. The package description type table mainly includes a basic type, a set type, and a self-defined class full name, and specifically, reference may be made to a specific description table of a class of the package description type shown in table 2.
TABLE 2
Specifically, a general component implementation extension interface is defined in advance for the component management library. This interface provides the necessary method of component operation. The method mainly includes a component content obtaining method, a component content storing method, and a component content serialization method, which may specifically refer to a description table of a component implementation expansion interface shown in table 3.
TABLE 3
In one embodiment of the application, the extended interface is realized based on each type of component, and the operation is uniformly scheduled by a component library.
In one embodiment of the application, the characteristic information of the component is determined according to the data information corresponding to the developed component. Wherein the characteristic information at least comprises one or more of component type, functional characteristics and industry field. And uploading the component and the characteristic information corresponding to the component to a component management library so as to determine the preset component of the corresponding type according to the instruction input by the user.
Specifically, the developer writes the custom content into the component content according to the current project requirements. The developer needs to determine in advance the characteristics of the component, such as the type of the component, the functional characteristics of the component, the field of the component. And uploading the component and the characteristic information corresponding to the component to a component management library. At the moment, each component has a corresponding label, and later-stage users can find the corresponding component for downloading and using only by inputting keywords when searching for the related component.
In an embodiment of the application, maintenance management is performed on the obtained preset component based on a component management library.
In one embodiment of the application, the component management device receives a component upgrading instruction to upgrade a component corresponding to the instruction, and displays the upgraded component of the latest version to a user. And receiving a component expiration instruction, updating the state of the component corresponding to the instruction to be an expired state, and displaying the expired component to the user.
Specifically, in the component management library function, the developer can continuously maintain the components uploaded by the developer. After the component is upgraded, the component library can uniformly upgrade and manage the version. Other developers may see and use particular versions of components. The component management library provides the latest version of the component by default. And in the component management library function, the developer can set the components of the specific version uploaded by the developer to be in an expired state. And setting the version after the period, wherein other developers cannot inquire the version.
In addition, in the component management library function, developers can query components according to different dimensions. Such as component type, functional characteristics, industry field, etc. And in the component management library function, the developer can upload the components developed by the developer. After uploading, the components are managed and classified in a unified way by the component library. Meanwhile, developers can search required components in the component library according to requirements. At this time, the component management library screens out the components that meet the conditions. The developer can select the component suitable for the developer to download and use.
In one embodiment of the present application, the component management device monitors and analyzes usage data of the components in real time. The use data at least comprises one or more items of inquiry times, browsing times and downloading times of the user on the component. And the component management equipment counts the use feedback information corresponding to the components. Wherein the usage feedback information at least comprises one or more items of the comment data and the number of praise of the user to the component. And sorting the components according to the use data and the use feedback information to select the hot components and preferentially push the hot components to the user.
Specifically, in the component management library function, the query, browsing and downloading conditions of the components are statistically analyzed, and each hot component is identified. And the functions of praise, comment and the like are provided, and developers can feed back the use condition of the component or put forward precious opinions after use. The component management library also carries out component arrangement aiming at information such as hot components, praise quantity and the like so as to push the hot components.
In one embodiment of the application, a user obtains a corresponding component from a component management library according to a current project requirement. At this time, the user may input a keyword corresponding to a component desired to be searched for, so as to search for the component.
For example, in a project, an organization management function is developed by using a low-code development platform. Based on a low-code development platform, the method can quickly build a model and complete the basic operations of increasing, deleting, modifying, checking and the like of the organization and management function. However, the organization structure belongs to a tree structure, and related members of the tree structure need to be added. By means of the member management function, a keyword tree structure is searched, and in a return result, a member group containing a tree structure member operation package comprises members: the system comprises a plurality of components such as a newly added peer web component, a newly added sub-level web component, a newly added peer program set component, a newly added sub-level program set component, a deleted cascade deleted sub-level component, a query component for acquiring data according to a hierarchy, a component for storing check tree information before storing, a component for calculating detail, and the like. At this time, the user can download the above components in a package.
S102, according to the type of the preset component, determining a configuration file corresponding to the preset component, and determining a subclass corresponding to the preset component in the configuration file.
In one embodiment of the present application, the type of the preset component is compared with the types in the plurality of configuration files to determine the configuration file matching the type of the preset component. And determining a logic subclass and a structure subclass corresponding to the preset member according to the configuration file. And the configuration files corresponding to the components of the same type are the same.
Specifically, the embodiment of the present application is provided with a configuration file in advance, and the configuration file contains a component type and a component subclass. Wherein each profile corresponds to a type of component. And determining a corresponding configuration file according to the component type, and determining a logic subclass and a structure subclass according to the configuration file. The member logic subclass is an interface implementation, and the member structure subclass is a custom structure, which may specifically refer to a description table of a configuration file shown in table 4.
Attribute name
|
Means of
|
CompType
|
The type of component.
|
ComponentClassName
|
The component structure subclass full name.
|
ComponentManager
|
The member logic implements the full name of class subclass class. |
TABLE 4
Specifically, the configuration file mainly includes a component type, a full name of a component structure subclass class, and a full name of a component logic implementation class subclass class. Each type of configuration file corresponds to a corresponding full name of the structure subclass class and corresponds to a corresponding full name of the logic subclass class.
S103, calling a component expansion interface according to the subclass corresponding to the preset component to acquire the custom structure content corresponding to the preset component.
In an embodiment of the present application, an implementation of an extended interface corresponding to a component is determined according to a logic subclass corresponding to a preset component. And determining the self-defined structure content in the preset member according to the structure subclass corresponding to the preset member. And calling a component expansion interface through the expansion interface to acquire the custom structure content corresponding to the current project.
Specifically, in the found configuration file corresponding to the preset component, the logic subclass of the preset component is determined, so that the corresponding extended interface implementation of the preset component is determined according to the logic subclass. And determining the self-defined structure content corresponding to the preset member according to the structure subclass corresponding to the configuration file. Therefore, the acquisition method corresponding to the preset component is called in a reflection mode, and the user-defined structure content is acquired.
Fig. 2 is a schematic diagram of a component management method according to an embodiment of the present application. As shown in fig. 2, a developer may upload various components such as a submission approval web component, a personnel management attendance statistics web component, and a personnel management performance query web component to a low code development platform. And the user searches the corresponding component in the component management library according to the current project requirement, and at the moment, the component public structure in the component management library can be called. Determining a configuration file of the component according to the type of the component, determining a corresponding expansion interface implementation according to the configuration file, and calling the self-defined content in the web component, or the assembly component, or the verification component before deletion through the expansion interface. For example, if the function required to be implemented by the current project is personnel attendance statistics, the function is implemented through a corresponding interface, a component extension interface is called, and the personnel management attendance statistics web component acquired from the web component is used. The component is downloaded to implement the functionality of the current project.
And S104, realizing the corresponding function of the current project based on the self-defined structure content.
In one embodiment of the present application, the developer may also search the component management library for the required components according to the requirement. At this time, the component management library screens out components that meet the conditions. The developer can select the component suitable for the developer according to the self-defined structure content in the component, and the component is downloaded for use.
For example, the user searches for the keyword "tree structure" by means of the component management function, and returns a component group including "tree structure component operation package" in the result. The inner side comprises components: the system comprises a plurality of components such as a newly added peer web component, a newly added sub-level web component, a newly added peer program set component, a newly added sub-level program set component, a deleted cascade deleted sub-level component, a query component for acquiring data according to a hierarchy, a component for storing check tree information before storing, a component for calculating detail, and the like. At this point, the user downloads the component sought.
Based on the current project requirement, adding a program set component, a newly added peer program set component and a newly added sub-level program set component in the back end view layer modeling. And adding web components, namely adding the same-level web components and adding the sub-level web components in the front-end form modeling. At this time, the function completes the realization of the same level organization and the sub level organization of the adding tree.
And further, adding a deleted component in the back-end business entity modeling, and cascading the deleted sub-level component. In this case, in the organization management function, when a certain organization is deleted, the subordinate organizations belonging thereto are deleted in cascade.
Furthermore, a query expansion component is added in the back-end view layer modeling, and the query component of the data is obtained according to the hierarchy. At the moment, when data is inquired in the organization management function, the hierarchical loading logic is realized, and the function loading performance is improved.
Furthermore, a check-before-storage component is added in the back-end business entity modeling, and a tree information component is checked. At this time, in the organization management function, when data is stored, whether the parent level data of the current check point exists or not is checked, and the occurrence of garbage data which has no parent node and is not a root node is avoided.
Furthermore, an expansion component after data fetching is added in the back-end business entity modeling, and whether the component is calculated in detail or not is judged. At this time, in the organization management function, after the data is acquired, whether the data is a detail node or not is judged according to the current data query structure, and whether the value of the detail field or not is corrected.
Fig. 3 is a schematic structural diagram of a component management apparatus according to an embodiment of the present application. As shown in fig. 3, the component management apparatus includes:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to:
acquiring a keyword searching instruction sent by a user, and searching a preset component corresponding to the keyword in a component management library according to the keyword; wherein the component management library comprises a plurality of preset components;
determining a configuration file corresponding to the preset component according to the type of the preset component, and determining a subclass corresponding to the preset component in the configuration file;
calling a component expansion interface according to the subclass corresponding to the preset component to acquire the self-defined structure content corresponding to the preset component; wherein the custom structure content is the component content associated with the current project;
and realizing the function corresponding to the current project based on the self-defined structure content.
An embodiment of the present application provides a non-volatile computer storage medium storing computer-executable instructions, where the computer-executable instructions are configured to:
acquiring a keyword searching instruction sent by a user, and searching a preset component corresponding to the keyword in a component management library according to the keyword; wherein the component management library comprises a plurality of preset components;
determining a configuration file corresponding to the preset component according to the type of the preset component, and determining a subclass corresponding to the preset component in the configuration file;
calling a component expansion interface according to the subclass corresponding to the preset component to acquire the self-defined structure content corresponding to the preset component; wherein the custom structure content is the component content associated with the current project;
and realizing the function corresponding to the current project based on the self-defined structure content.
The embodiments in the present application are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the embodiments of the apparatus, the device, and the nonvolatile computer storage medium, since they are substantially similar to the embodiments of the method, the description is simple, and for the relevant points, reference may be made to the partial description of the embodiments of the method.
The foregoing description of specific embodiments of the present application has been presented. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the embodiments of the present application pertain. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the embodiments of the present application shall be included in the scope of the claims of the present application.