CN112433703A - Component module creating method and device, server and storage medium - Google Patents

Component module creating method and device, server and storage medium Download PDF

Info

Publication number
CN112433703A
CN112433703A CN201910791778.1A CN201910791778A CN112433703A CN 112433703 A CN112433703 A CN 112433703A CN 201910791778 A CN201910791778 A CN 201910791778A CN 112433703 A CN112433703 A CN 112433703A
Authority
CN
China
Prior art keywords
module
component module
target
creation
creating
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910791778.1A
Other languages
Chinese (zh)
Other versions
CN112433703B (en
Inventor
方旭楷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201910791778.1A priority Critical patent/CN112433703B/en
Publication of CN112433703A publication Critical patent/CN112433703A/en
Application granted granted Critical
Publication of CN112433703B publication Critical patent/CN112433703B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a component module creating method, a device, a server and a storage medium, which are used for receiving a component module creating request carrying a target module name of a component module to be created; acquiring a preset basic component module and configuration information, wherein the basic component module carries variables representing module names; and then configuring the basic component module based on the configuration mode indicated by the configuration information, so as to obtain the target component module conforming to the componentization framework specification, wherein the configuration mode comprises replacing the target module name with the variable in the basic component module. According to the method and the device, the creation of the component module is realized without utilizing the template for creating the component module, the created basic component module is directly configured based on the configuration mode indicated by the configuration information to generate the target component module which accords with the componentized framework specification, developers do not need to know the content of the template for generating the component module and the specification of the IDE development template, and further labor cost is reduced.

Description

Component module creating method and device, server and storage medium
Technical Field
The present invention relates to the field of application development technologies, and in particular, to a component module creation method, device, server, and storage medium.
Background
An Integrated Development Environment (IDE) is an application program for providing a program Development Environment. The engineering project created by the IDE can be accessed into the componentized framework, and the application development is realized through the function of the modular construction script of the componentized framework.
Engineering project of IDEs the basis for access-based componentized framework development applications is to create component modules that conform to the componentized framework specification, whereas the created component modules of the IDE cannot meet the componentized framework specification. To address this problem, the prior art is typically to manually modify a template in the IDE for creating a component module by a developer to obtain a target template to create a component module that conforms to the componentized framework specification based on the target template.
Although the component module following the componentized framework specification can be created in the engineering project of the IDE, the method has high requirements on developers, and not only needs the developers to know the template content of the component module, but also needs the developers to learn the specification of the IDE development template, so that the labor cost is high.
Disclosure of Invention
In view of the above, the present invention provides a component module creating method, device, server and storage medium to solve the above problems. The technical scheme is as follows:
a component module creation method applied to an Integrated Development Environment (IDE), the method comprising:
receiving a component module creating request, wherein the component module creating request carries a target module name of a component module to be created;
acquiring a preset basic component module and configuration information, wherein the basic component module carries variables representing module names;
and configuring the basic component module based on the configuration mode indicated by the configuration information to obtain a target component module conforming to the componentized framework specification, wherein the configuration mode comprises replacing the target module name with the variable in the basic component module.
A component module creation apparatus comprising:
the device comprises a request receiving unit, a component module creating unit and a component module creating unit, wherein the request receiving unit is used for receiving a component module creating request which carries a target module name of a component module to be created;
the information acquisition unit is used for acquiring a preset basic component module and configuration information, wherein the basic component module carries a variable representing a module name;
and the module creating unit is used for configuring the basic component module based on the configuration mode indicated by the configuration information to obtain a target component module conforming to the componentization framework specification, wherein the configuration mode comprises replacing the target module name with the variable in the basic component module.
A server, comprising: at least one memory and at least one processor; the memory stores a program, and the processor calls the program stored in the memory, the program being for implementing the component module creation method.
A storage medium having stored therein computer-executable instructions for performing the component module creation method.
The application provides a component module creating method, a device, a server and a storage medium, which are used for receiving a component module creating request carrying a target module name of a component module to be created; acquiring a preset basic component module and configuration information, wherein the basic component module carries variables representing module names; and then configuring the basic component module based on the configuration mode indicated by the configuration information, so as to obtain the target component module conforming to the componentization framework specification, wherein the configuration mode comprises replacing the target module name with the variable in the basic component module. According to the method and the device, the creation of the component module is realized without utilizing the template for creating the component module, the created basic component module is directly configured based on the configuration mode indicated by the configuration information to generate the target component module which accords with the componentized framework specification, developers do not need to know the content of the template for generating the component module and the specification of the IDE development template, and further labor cost is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1(a) to fig. 1(d) are schematic diagrams illustrating a function of creating a module of an IDE assembly according to the prior art according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a target template provided by an embodiment of the present application;
fig. 3 is a flowchart of a method for generating a module creation plug-in according to an embodiment of the present disclosure;
fig. 4(a) to fig. 4(c) are schematic diagrams illustrating a component module creating method according to an embodiment of the present application;
FIG. 5 is a flowchart of a component module creation method provided in an embodiment of the present application;
FIG. 6 is a flowchart of a method for receiving a component module creation request according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an assembly module creating apparatus according to an embodiment of the present application;
fig. 8 is a block diagram of a hardware structure of a server to which a component module creation method according to an embodiment of the present application is applied.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example (b):
the integrated development environment IDE is an application program for providing a program development environment, and for example, as (android) is development environment software for developing an android program.
Engineering projects created by the IDE (which may also be referred to simply as engineering for simplicity of description) may access functional development applications that the componentized framework utilizes modular build scripts of the componentized framework.
Engineering projects of the IDE to access the componentized framework requires the IDE to create a Module, i.e., a Module, that conforms to the specification of the componentized framework, which is a functional unit of the program, and it can be simply understood that the program is composed of many functional units. In this scenario, the IDE is a componentized framework that is accessed upon creation of a module that conforms to the componentized framework specification, and therefore the module referred to in this application is temporarily referred to as a component module.
In the prior art, an IDE provides a component Module creation function, for example, an AS provides a New Module function, selecting and creating the New Module in the AS, popping up a dialog box, where the dialog box includes a plurality of templates, selecting a template, clicking Next below, displaying a name input interface, inputting a Module name of a Module to be generated in the name input interface to confirm creation, and then generating a Module name AS the input Module name according to the selected template. Referring to fig. 1(a), when a user selects to create a New Module in the AS, a dialog box pops up, the dialog box refers to fig. 1(b), a plurality of templates are displayed in the dialog box, the user selects one template (e.g., Android Library) to click Next, a name input interface shown in fig. 1(c) is displayed, the user inputs a Module name (DemoLibrary) of a Module to be generated in the name input interface to click Next to confirm creation, and then the Module shown in fig. 1(d) is created in the project directory project, and the template name of the Module is DemoLibrary. The name input interface shown in fig. 1(c) may also input a file name demolibrary2 of the configuration file of the module to be generated.
However, while the prior art IDE provides component module creation functionality to create modules, the modules it creates do not conform to the componentized framework specification. At present, in order to make the created module conform to the modular framework specification, a developer generally adopts a method of performing secondary processing on a template for generating a module to obtain a target template, see fig. 2, and installing the target template in an IDE, so that the module conforming to the modular framework specification can be generated through the target module.
The target template is installed in the AS, usually, the written target template is placed inside an installation directory, and after the AS is restarted, the AS will parse the installation directory so that the target template can be displayed when a NewModule is generated.
Obviously, the module meeting the specification of the modular framework can be generated by performing secondary processing on the template for generating the module to obtain the target template, but developers need to know the content of the template in the template to be subjected to secondary processing and learn the specification of the AS development template, so that the labor cost is high.
In order to solve the above problem, embodiments of the present application provide a component module creation method to implement component module creation without requiring developers to know the template content and the specification of an IDE development template.
The embodiment of the application provides a module creation plug-in, and after the module creation plug-in is installed in an IDE, the IDE can generate a component module conforming to a componentized framework specification based on the module creation plug-in.
The component module creation method provided by the embodiment of the present application is described in detail below from the perspective of module creation plug-in generation.
Fig. 3 is a flowchart of a method for generating a module creation plug-in according to an embodiment of the present application.
As shown in fig. 3, the method includes:
s301, responding to a plug-in creating request of the module, and creating an association relation between the plug-in creating of the original module and the module information compression package;
in the embodiment of the present application, the module information compression packet includes a basic component module and configuration information, and the configuration information includes at least one configuration mode for configuring the basic component module. Configuring the base component module based on the configuration mode indicated by the configuration information can obtain a target component module, and the target component module conforms to the componentized framework specification.
As a preferred implementation manner of the embodiment of the present application, a processing logic is encapsulated in the original module creation plug-in, and the processing logic is configured to configure the base component module according to the configuration manner indicated by the configuration information to obtain the target component module.
In this embodiment of the present application, preferably, the original module creating plug-in and the module information compressed package may be placed in the same module creating directory, and after a module creating plug-in generation request is received, an association relationship between the original module creating plug-in and the module information compressed package in the module creating directory may be established.
As a preferred implementation of the embodiment of the present application, the module information compression packet is a compression packet obtained by compressing the basic component module and the configuration information. Accordingly, if the basic component module and the configuration information in the module information compressed packet are to be obtained, the module information compressed packet may be decompressed to obtain the basic component module and the configuration information.
In the embodiment of the application, the original module creation plug-in and the module information compression packet can be packaged in a manner of triggering the uploadArchives task in the original module creation plug-in, so as to achieve the purpose of associating the original module creation plug-in and the module information compression packet.
S302, triggering a task in the original module creation plug-in, responding to the task, storing the module information compression packet to a resource directory in the original module creation plug-in related to the task, and generating the module creation plug-in.
In this embodiment of the present application, preferably, the original module creating plug-in and the module information compressed package may be placed in the same module creating directory, after a module creating plug-in generation request is received, an association relationship between the original module creating plug-in and the module information compressed package in the module creating directory is established, after the association relationship between the original module creating plug-in and the module information compressed package is established, a task in the original module creating plug-in may be triggered, and the original module creating plug-in stores the module information compressed package associated with the original module creating plug-in to a resource directory in the original module creating plug-in response to the task, so as to generate the module creating plug-in.
As a preferred implementation manner of the embodiment of the present application, the module information compression package associated with the original module creation plug-in may be stored to the resource directory of the original module creation plug-in by triggering a packagewheeljecttozip task in the original module creation plug-in to generate the module creation plug-in.
As a preferred implementation of the embodiment of the present application, the module creation plug-in may be implemented based on the Gradle plug, or may be implemented based on the JavaPoet. Wherein, Gradle Plugin: and building a script function in a modularization mode. JavaPoet: and a library is developed, a Java class can be simply defined, and then the corresponding file function is generated by using codes.
In the embodiment of the present application, the generated module creation plug-in may be referred to as an fgp (fgp Gradle plug) plug-in, which is only one preferred generation manner of the module creation plug-in provided in the embodiment of the present application, and the inventor may set a specific generation manner of the module creation plug-in according to his own needs, which is not limited herein.
Furthermore, after the module creating plug-in is generated, the module creating plug-in can be uploaded to a cloud server for developers to use, so that the problem that versions of the module creating plug-in and the component module are consistent is solved, the IDE on a terminal held by the developers can download the module creating plug-in from the cloud server when the IDE needs to use the module creating plug-in, and the module creating plug-in is used for creating the component module meeting the component framework specification.
Based on the above description of the generation of the module creation plug-in, a detailed description will now be made of a component module creation method provided in the embodiment of the present application, from the viewpoint of downloading a module from a terminal to create a plug-in and creating a component module that conforms to the componentized framework specification using the module creation plug-in.
After the IDE in the terminal downloads the module creating plug-in from the cloud server, the module creating plug-in can be installed, and the installed module creating plug-in can be triggered by a target IDE plug-in installed in the IDE to create a component module meeting the component framework specification.
A target IDE plug-in may be installed in the IDE [ fig. 4(a) is a partial interface schematic diagram of the IDE, the target IDE plug-in may refer to the falco tools plug-in fig. 4(a) ], clicking the falco tools plug-in display module creation identifier [ the module creation identifier may be the "add biz module" in fig. 4(a) ], and clicking the "add biz module" may trigger invoking the module creation plug-in to create the plug-in generation component module based on the module.
As a preferred implementation manner of the embodiment of the present application, after "add biz module" is clicked, a module creation interface [ which may be a dialog box as shown in fig. 4(b) ] may be displayed, a target module name "test" of a component module to be created is input in the dialog box as shown in fig. 4(b), and a "OK" button is clicked, so that a component module creation request is generated, based on which a component module [ see the component module biz-test "created in project in fig. 4(c) ] may be created, and the module name of the created component module is related to the target module name test.
The component module biz-test serving as a preferred embodiment of the application comprises 3 files, namely a test-interface file, a test-model file and a test-ui file. The inventor can set the specific content in each of the 3 files according to the requirement of the inventor, and only the specific content is ensured to meet the specification of the componentized framework.
The following describes a component module creation method provided in the embodiments of the present application in detail from a specific implementation perspective.
Fig. 5 is a flowchart of a component module creation method provided in an embodiment of the present application. The component module creation method shown in fig. 5 is applied to a module creation plug-in the IDE.
As shown in fig. 5, the method includes:
s501, receiving a component module creating request, wherein the component module creating request carries a target module name of a component module to be created;
in an embodiment of the present application, a module creation plug-in an IDE may receive a component module creation request that carries a target module name for a component module to be created.
As a preferred embodiment mode of the embodiment of the present application, a method for receiving a component module creation request may refer to fig. 6. As shown in fig. 6, the method includes:
s601, responding to a trigger operation display module for a target key displayed in the IDE to establish an interface;
a target key is set in the IDE, and the target key comprises a target IDE plug-in [ FalcoTools plug-in as shown in fig. 4(a) ] set in the IDE and a module creation identifier displayed after the target IDE plug-in is triggered.
As a preferred implementation of the embodiment of the present application, the display module may be created by responding to a trigger to a target IDE plug-in displayed in the IDE; and receiving a mode of creating an interface for the trigger operation display module of the component module creation identifier, and achieving the purpose of creating the interface for the trigger operation display module of the target key displayed in the IDE in response. For example, triggering a target IDE plug-in displayed in the IDE interface [ falco tools plug-in as shown in fig. 4(a) ] displays a module creation identifier [ add biz module as shown in fig. 4(a) ]; trigger the module creation identification calling module to create a plug-in display module creation interface [ the module creation interface see dialog box as shown in fig. 4(b) ].
S602, receiving a component module creating request sent based on the setting operation of the module name in the module creating interface, wherein the target module name indicated by the component module creating request is the module name set by the setting operation.
In this embodiment of the present application, after the module creation interface is displayed, a module name setting operation may be performed on the module creation interface to set a target module name of a component module to be created, and after a target module name of the component module to be created is set [ see "test" in fig. 4(b) ], a "OK" button may be clicked, and a component module creation request may be sent to the module creation plug-in, where the component module creation request carries the target module name test of the component module to be created. Further, performing steps S502-S503 based on the component module creation request may generate a component module, see fig. 4(c), whose module name is related to the target module name.
S502, acquiring a preset basic component module and configuration information, wherein the basic component module carries a variable representing a module name;
in this embodiment of the present application, after the module creating plug-in receives the component module creating request, the module creating plug-in may obtain a preset module information compression packet from a resource directory of the module creating plug-in, and decompress the module information compression packet to obtain the basic component module and the configuration information.
As a preferred implementation of the embodiment of the present application, the basic component module carries a variable characterizing the module name. The above is only the preferred content in the basic component module provided in the embodiment of the present application, and the basic component module may further include other content, and the inventor may set the content according to his own needs, which is not limited herein.
In an embodiment of the present application, the configuration information indicates at least one configuration manner for configuring the base component module. At least one configuration includes replacing a target module name indicated by the component module creation request with a variable in the base component module that characterizes the module name.
After the module creating plug-in acquires the basic component module and the configuration information, the module creating plug-in can read the configuration mode indicated by the configuration information, and the basic component module is configured according to the configuration mode to obtain the target component module.
As a preferred implementation of the embodiment of the present application, the configuration manner may also be a modified configuration, for example, the configuration manner indicates the first configuration content and the first configuration path, and modifies the content of the base component module in the first configuration path into the first configuration content.
As another preferred embodiment of the present application, the configuration manner may also be an addition configuration, for example, the configuration manner indicates second configuration content and a second configuration path, and the second configuration content is added under the second configuration path of the base component module.
As another preferred implementation of the embodiment of the present application, the configuration manner may also be a configuration deletion manner, for example, the configuration manner indicates the third configuration path, and deletes the content of the basic component module in the third configuration path.
The above is only the preferable content of the configuration provided in the embodiment of the present application, and the inventor can set the specific content of the configuration according to his own needs, which is not limited herein.
In this embodiment of the present application, the purpose of configuring the basic component module based on the configuration mode indicated by the configuration information may be: firstly, the module name of the created target component module is related to the target module name carried by the component creation request; second, the created target component module is made to conform to the componentized framework specification.
S503, configuring the basic component module based on the configuration mode indicated by the configuration information to obtain a target component module conforming to the componentization framework specification, wherein the configuration mode comprises replacing variables in the basic component module with the name of the target module.
In this embodiment of the application, the basic component module is configured based on the configuration mode indicated by the configuration information, and the configured basic component module can be regarded as a target component module. In the embodiment of the present application, because the configuration manner includes that the variable characterizing the module name in the basic component module is replaced by the target module name indicated by the component module creation request, the generated module name of the target component module is related to the target module name carried by the component module creation request. As shown in fig. 4(b), test is a target module name carried by the component module creation request, and the target component module obtained by replacing the variable representing the module name in the basic component module with the target module name is biz-test, where the biz-test includes a test-interface file, a test-model file, and a test-ui file. Wherein, the test in biz-test, test-interface, test-model and test-ui can be considered as the result of replacing the variable by the test.
In the embodiment of the application, a module information compression packet in a resource target of a module creation plug-in can be obtained by triggering the mode of an addnewplugtask in the module creation plug-in, the module information compression packet is decompressed to obtain a basic component module and configuration information, and the basic component module is configured based on the configuration mode indicated by the configuration information to obtain a target component module conforming to a componentization framework specification.
Further, with reference to fig. 5, the method for creating a component module provided in the embodiment of the present application further includes:
s504, adding the target component module into a target directory which is indicated by the configuration information and is positioned in the project;
in this embodiment of the present application, preferably, the receiving a component module creation request is specifically to receive a component module creation request in a project creation process. In the project creation process, a component module creation request may be received to create a target component module in a project.
As a preferred implementation of the embodiment of the present application, in a process of creating a project, a component module creation request is received, a base component module and configuration information are obtained, a target component module conforming to a componentization framework specification is obtained by configuring the base component module based on a configuration mode indicated by the configuration information, a target directory indicated by the configuration information may be determined, and the target component module is added to the target directory of the project.
Further, an embodiment of the present application provides a component module creating method, further including:
and S505, adding component module information in the configuration file of the project, wherein the component module information represents that a target component module is created in the project.
In the embodiment of the application, in the process of creating the project, after a component module creating request is received and a target component module is generated, component module information can be added in a configuration file of the project, wherein the component module information represents that the target component module is created in the project.
For example, in the process of creating the project 1, a component module creation request is received, a basic component module and configuration information are acquired, the basic component module is configured according to a configuration mode indicated by the configuration information to obtain a target component module 1, a target directory indicated by the configuration information can be determined, the target component module 1 is added to the target directory of the project 1, component module information 1 is added to a configuration file of the project 1, and the component module information 1 represents that the target component module 1 is added to the project 1.
When the component module is created based on the component module creation method provided by the embodiment of the application, a preset basic component module and configuration information are obtained, and the basic component module is directly configured based on the configuration information to obtain a target component module which accords with the componentization framework specification. According to the method and the device, the creation of the component module is realized without using a template for creating the component module, but the created basic component module is configured directly based on the configuration mode indicated by the configuration information, and the target component module which accords with the componentization framework specification is generated. Therefore, when the purpose of creating the component module which accords with the componentized framework specification is achieved, the template for generating the component module does not need to be modified, correspondingly, developers do not need to know the content of the template for generating the component module and the specification of the IDE development template, and further labor cost is reduced.
Further, in the prior art, the target template is not a template owned by the AS officer, but is a self-defined template. Therefore, the AS needs to be updated once again, the installation process of the target template needs to be created again for each updating, the new version of the installation catalog needs to be created again for each updating, the target template is manually migrated to the installation catalog, and the maintenance cost is high.
In addition, in the prior art, because the created target template and the modular framework are used together, the version consistency of the target template and the modular framework needs to be ensured. Therefore, each time the componentized framework is updated, the target template needs to be manually updated once, and if the target template is forgotten to be updated, the target template and the componentized framework are usually inconsistent in version, so that the target template cannot be used.
In the implementation process, the target template is not involved, so that the target template does not need to be installed again every time the AS is upgraded, and the maintenance cost can be reduced compared with the prior art. In addition, the version of the plug-in is created only by updating the module, and the problem that the version of the target template is inconsistent with that of the componentized framework is not needed to be worried about.
Fig. 7 is a schematic structural diagram of an assembly module creating apparatus according to an embodiment of the present application.
As shown in fig. 7, the apparatus includes:
a request receiving unit 71, configured to receive a component module creation request, where the component module creation request carries a target module name of a component module to be created;
an information obtaining unit 72, configured to obtain a preset basic component module and configuration information, where the basic component module carries a variable representing a module name;
and the module creating unit 73 is used for configuring the basic component module based on the configuration mode indicated by the configuration information to obtain a target component module conforming to the componentized framework specification, wherein the configuration mode comprises replacing the target module name with the variable in the basic component module.
In the embodiment of the present application, preferably, the request receiving unit is specifically configured to receive a component module creation request sent in a project creation process; correspondingly, the device further comprises a first information adding unit for adding the target component module to the target directory located in the project and indicated by the configuration information.
Further, the component creating apparatus provided in the embodiment of the present application further includes a second information adding unit, configured to add component module information in the configuration file of the project, where the component module information represents that the target component module is created in the project.
In the embodiment of the present application, preferably, the request receiving unit includes:
the trigger unit is used for responding to the trigger operation display module of the target key displayed in the IDE to establish an interface;
and the request receiving subunit is used for receiving a component module creating request sent based on the setting operation of the module name in the module creating interface, wherein the target module name indicated by the component module creating request is the module name set by the setting operation.
In the embodiment of the present application, preferably, the trigger unit includes:
the first trigger unit is used for responding to the trigger operation display module of the target IDE plug-in unit displayed in the IDE to establish an identifier;
and the second trigger unit is used for receiving a trigger operation display module creation interface of the component module creation identifier.
In the embodiment of the present application, preferably, the information acquiring unit includes:
the module information acquisition unit is used for acquiring a preset module information compression packet from the resource directory;
and the decompression unit is used for decompressing the module information compression packet to obtain the basic component module and the configuration information.
Further, an assembly module creating apparatus provided in an embodiment of the present application further includes a module creating plug-in generating unit, where the module creating plug-in generating unit includes:
the association unit is used for responding to the module creation plug-in generation request and establishing the association relation between the original module creation plug-in and the module information compression package;
and the module creation plug-in generation subunit is used for triggering the task in the original module creation plug-in, responding to the task, storing the module information compression packet into the resource directory in the original module creation plug-in related to the module information compression packet, and generating the module creation plug-in.
The component module creation method provided by the embodiment of the application can be applied to a server, and the server can be a service device which provides service for a user on a network side, can be a server cluster formed by a plurality of servers, and can also be a single server.
Alternatively, fig. 8 shows a block diagram of a hardware structure of the server, and referring to fig. 8, the hardware structure of the server may include: a processor 81, a communication interface 82, a memory 83 and a communication bus 84;
in the embodiment of the present invention, the number of the processor 81, the communication interface 82, the memory 83 and the communication bus 84 may be at least one, and the processor 81, the communication interface 82 and the memory 83 complete communication with each other through the communication bus 84;
the processor 81 may be a central processing unit CPU, or an application Specific Integrated circuit asic, or one or more Integrated circuits configured to implement embodiments of the present invention, or the like;
the memory 83 may include a high-speed RAM memory, and may further include a non-volatile memory (non-volatile memory) or the like, such as at least one disk memory;
wherein the memory stores a program, the processor may invoke the program stored in the memory, and the program is operable to:
receiving a component module creating request, wherein the component module creating request carries a target module name of a component module to be created;
acquiring a preset basic component module and configuration information, wherein the basic component module carries variables representing module names;
and configuring the basic component module based on the configuration mode indicated by the configuration information to obtain the target component module conforming to the componentized framework specification, wherein the configuration mode comprises replacing the target module name with the variable in the basic component module.
Further, an embodiment of the present application also provides a computer-readable storage medium, where computer-executable instructions are stored in the computer-readable storage medium, and the computer-executable instructions are used to execute the component module creating method.
Alternatively, the detailed functionality and extended functionality of the computer-executable instructions may be as described above.
The application provides a component module creating method, a device, a server and a storage medium, which are used for receiving a component module creating request carrying a target module name of a component module to be created; acquiring a preset basic component module and configuration information, wherein the basic component module carries variables representing module names; and then configuring the basic component module based on the configuration mode indicated by the configuration information, so as to obtain the target component module conforming to the componentization framework specification, wherein the configuration mode comprises replacing the target module name with the variable in the basic component module. According to the method and the device, the creation of the component module is realized without utilizing the template for creating the component module, the created basic component module is directly configured based on the configuration mode indicated by the configuration information to generate the target component module which accords with the componentized framework specification, developers do not need to know the content of the template for generating the component module and the specification of the IDE development template, and further labor cost is reduced.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A component module creation method applied to an Integrated Development Environment (IDE), the method comprising:
receiving a component module creating request, wherein the component module creating request carries a target module name of a component module to be created;
acquiring a preset basic component module and configuration information, wherein the basic component module carries variables representing module names;
and configuring the basic component module based on the configuration mode indicated by the configuration information to obtain a target component module conforming to the componentized framework specification, wherein the configuration mode comprises replacing the target module name with the variable in the basic component module.
2. The method of claim 1, wherein receiving a component module creation request comprises receiving a component module creation request sent during a project creation process, the method further comprising:
and adding the target component module to a target directory located in the project and indicated by the configuration information.
3. The method of claim 2, further comprising:
adding component module information in the configuration file of the project, the component module information characterizing that the target component module is created in the project.
4. The method of claim 1, wherein receiving a component module creation request comprises:
responding to the trigger operation display module of the target key displayed in the IDE to create an interface;
receiving a component module creation request sent based on the setting operation of the module name in the module creation interface, wherein the target module name indicated by the component module creation request is the module name set by the setting operation.
5. The method of claim 4, wherein the creating an interface in response to the triggering of the target key displayed in the IDE to operate the display module comprises:
responding to a trigger operation display module of a target IDE plug-in displayed in the IDE to establish an identifier;
and receiving a trigger operation display module creation interface of the component module creation identifier.
6. The method of claim 1, wherein obtaining the preset base component module and configuration information comprises:
acquiring a preset module information compression packet from a resource directory;
and decompressing the module information compression packet to obtain a basic component module and configuration information.
7. The method according to claim 6, wherein the method is applied to a module creation plug-in the IDE, and the generation process of the module creation plug-in comprises:
a response module creates a plug-in generating request, and establishes an incidence relation between an original module creating plug-in and the module information compression package;
triggering a task in the original module creation plug-in, responding to the task, storing the module information compression packet to the resource directory in the original module creation plug-in related to the module information compression packet, and generating a module creation plug-in.
8. An assembly module creation apparatus, comprising:
the device comprises a request receiving unit, a component module creating unit and a component module creating unit, wherein the request receiving unit is used for receiving a component module creating request which carries a target module name of a component module to be created;
the information acquisition unit is used for acquiring a preset basic component module and configuration information, wherein the basic component module carries a variable representing a module name;
and the module creating unit is used for configuring the basic component module based on the configuration mode indicated by the configuration information to obtain a target component module conforming to the componentization framework specification, wherein the configuration mode comprises replacing the target module name with the variable in the basic component module.
9. A server, comprising: at least one memory and at least one processor; the memory stores a program called by the processor, the program being for implementing the component module creating method according to any one of claims 1 to 7.
10. A storage medium having stored therein computer-executable instructions for performing the component module creation method of any one of claims 1-7.
CN201910791778.1A 2019-08-26 2019-08-26 Component module creation method and device, server and storage medium Active CN112433703B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910791778.1A CN112433703B (en) 2019-08-26 2019-08-26 Component module creation method and device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910791778.1A CN112433703B (en) 2019-08-26 2019-08-26 Component module creation method and device, server and storage medium

Publications (2)

Publication Number Publication Date
CN112433703A true CN112433703A (en) 2021-03-02
CN112433703B CN112433703B (en) 2023-10-13

Family

ID=74689822

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910791778.1A Active CN112433703B (en) 2019-08-26 2019-08-26 Component module creation method and device, server and storage medium

Country Status (1)

Country Link
CN (1) CN112433703B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113434219A (en) * 2021-07-08 2021-09-24 展讯通信(天津)有限公司 Information configuration method and equipment for engineering project
CN114265584A (en) * 2021-12-08 2022-04-01 中国联合网络通信集团有限公司 Page component generation method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461562A (en) * 2014-12-22 2015-03-25 山东中创软件商用中间件股份有限公司 Task creating method and system
CN108572813A (en) * 2018-03-24 2018-09-25 深圳市前海安测信息技术有限公司 Assembly type program development frame creates application system and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461562A (en) * 2014-12-22 2015-03-25 山东中创软件商用中间件股份有限公司 Task creating method and system
CN108572813A (en) * 2018-03-24 2018-09-25 深圳市前海安测信息技术有限公司 Assembly type program development frame creates application system and method

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113434219A (en) * 2021-07-08 2021-09-24 展讯通信(天津)有限公司 Information configuration method and equipment for engineering project
CN113434219B (en) * 2021-07-08 2024-03-26 展讯通信(天津)有限公司 Information configuration method and equipment for engineering project
CN114265584A (en) * 2021-12-08 2022-04-01 中国联合网络通信集团有限公司 Page component generation method, device, equipment and storage medium
CN114265584B (en) * 2021-12-08 2024-06-04 中国联合网络通信集团有限公司 Page component generation method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN112433703B (en) 2023-10-13

Similar Documents

Publication Publication Date Title
CN107979508B (en) Micro-service test method and device
CN110704847B (en) Vulnerability scanning method and related device
CN107896244B (en) Version file distribution method, client and server
CN106325847B (en) Method and device for acquiring application program function based on iOS platform
US20110154305A1 (en) System and method for remotely compiling multi-platform native applications for mobile devices
CN107547239B (en) Configuration object updating method and device
CN112685035B (en) Project development method and device, computer readable storage medium and electronic equipment
CN108519874B (en) Python project package generation method and device
CN110647332A (en) Software deployment method and device based on container cloud
CN111880987A (en) Dynamic monitoring method and device of application program, storage medium and electronic device
CN111142884A (en) Applet version deployment method and device, electronic equipment and storage medium
CN112433703B (en) Component module creation method and device, server and storage medium
CN112148315A (en) Software deployment method, device, server and storage medium
CN110989986A (en) Software template-based software generation method and device and computer equipment
CN109508193B (en) Application deployment and operation method, device, terminal equipment and medium
CN111104331A (en) Software management method, terminal device and computer-readable storage medium
CN115729604A (en) Micro application integration method, system, electronic device and storage medium
CN110888669A (en) Method and system for creating template engineering on IDE
JP7230951B2 (en) Mobile terminal, information processing system, control method, and program
CN115509545A (en) IOS application packaging construction method and device
CN112527377B (en) Application program generation processing method, device, computer equipment and storage medium
CN113626330A (en) Mixed-mode mobile application debugging method and system
CN113641580A (en) Mixed-mode mobile application debugging method and system
CN112433938A (en) Method and device for testing application of mobile terminal
CN112765038A (en) Distributed cluster software testing method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant