CN116360741A - Applet development method, system, device and storage medium - Google Patents

Applet development method, system, device and storage medium Download PDF

Info

Publication number
CN116360741A
CN116360741A CN202310356113.4A CN202310356113A CN116360741A CN 116360741 A CN116360741 A CN 116360741A CN 202310356113 A CN202310356113 A CN 202310356113A CN 116360741 A CN116360741 A CN 116360741A
Authority
CN
China
Prior art keywords
taro
applet
source code
module
code module
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.)
Pending
Application number
CN202310356113.4A
Other languages
Chinese (zh)
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.)
Ctrip Travel Information Technology Shanghai Co Ltd
Original Assignee
Ctrip Travel Information Technology Shanghai 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 Ctrip Travel Information Technology Shanghai Co Ltd filed Critical Ctrip Travel Information Technology Shanghai Co Ltd
Priority to CN202310356113.4A priority Critical patent/CN116360741A/en
Publication of CN116360741A publication Critical patent/CN116360741A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • 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
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention provides an applet development method, system, equipment and storage medium, wherein the method comprises the following steps: acquiring each service module associated with an applet to be developed; providing a Taro base template and a native public base module; creating at least one Taro source code module based on the Taro base template; each Taro source code module corresponds to one service module; integrating and compiling the Taro source code module to obtain a compiling product; integrating the compiling product and the native public basic module, generating a first target applet and issuing the first target applet; the invention is beneficial to avoiding excessive repeated development work of the applet and improving the development efficiency of the applet running on different platforms.

Description

Applet development method, system, device and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, a system, an apparatus, and a storage medium for developing an applet.
Background
The applet is widely used as an application that can be used without downloading and installing. The system is a light application running in the platform and developed by using technologies such as JavaScript, DSL (domain-specific language) specified by various platforms and the like. Nowadays, the running platforms are various, such as WeChat, payment treasures and the like, when a business requires that a certain applet is used on different platforms, the corresponding version needs to be developed according to DSL of the respective platform, so that the development task is heavy and the code maintenance is difficult. That is, each time a new class of applet entry is added, the developer must rewrite the original business logic once, the cost of writing multiple sets of code for different platforms is obviously very high, not only the working content is repeated, but also the business landing speed is seriously affected.
Therefore, how to improve the development efficiency of the applet running on different platforms and avoid excessive repeated development work is a problem at present.
It should be noted that the information disclosed in the above background section is only for enhancing understanding of the background of the invention and thus may include information that does not form the prior art that is already known to those of ordinary skill in the art.
Disclosure of Invention
Aiming at the problems in the prior art, the invention aims to provide an applet development method, an applet development system, an applet development device and a storage medium, which can avoid excessive repeated development work of the applet and improve the development efficiency of the applet running on different platforms.
To achieve the above object, the present invention provides an applet development method comprising the steps of:
s110, acquiring each service module associated with an applet to be developed;
s120, providing a Taro basic template and a native public basic module;
s130, creating at least one Taro source code module based on the Taro basic template; each Taro source code module corresponds to one service module;
s140, integrating and compiling the Taro source code module to obtain a compiling product;
and S150, integrating the compiling product and the native public basic module, generating a first target applet and issuing the first target applet.
Optionally, between step S140 and step S150, the method further comprises the steps of:
acquiring a storage warehouse of Taro source code modules corresponding to each service module;
generating sub-packaging path information corresponding to each Taro source code module according to a storage warehouse of each Taro source code module;
step S150 further includes:
and adding the sub-package path information corresponding to each Taro source code module into the item configuration corresponding to the first target applet.
Optionally, step S140 further includes:
and carrying out isolation processing on the sub-packet path information corresponding to each Taro source code module.
Optionally, the applet to be developed is formed based on native code construction; step S150 includes:
and integrating the native code associated with the applet to be developed based on the compiled product to obtain a first target applet.
Optionally, step S140 includes:
identifying placeholders in each Taro source code module;
determining a root path for referencing a file in the applet to be developed in the Taro source code module according to the placeholder;
compiling each Taro source code module according to the placeholder and the root path to obtain a relative path for referencing the file; the compilation product includes the relative path.
Optionally, step S140 includes:
acquiring the configuration information of the sub-package structure corresponding to each Taro source code module;
generating public code extraction configuration information of a preset packaging tool and a sub-packaging public file path according to the sub-packaging structure configuration information;
and extracting configuration information and a sub-packaging public file path according to the public codes, and packaging from a third party module on which the Taro source code module depends to obtain the sub-packaging public file.
Optionally, step S140 includes:
acquiring a release warehouse corresponding to the first target applet;
acquiring a first sub-warehouse corresponding to each Taro source code module and a second sub-warehouse corresponding to the Taro basic template;
establishing a father-son warehouse association relation between the first son warehouse and the release warehouse and between the second son warehouse and the release warehouse respectively;
step S150 includes:
and generating a first target applet according to the association relation of the father and son warehouses.
Optionally, the method further comprises the steps of:
acquiring Taro module configuration information stored in a server side;
acquiring a corresponding target Taro source code module according to the Taro module configuration information;
establishing a new association relationship between the father warehouse and the child warehouse according to the target Taro source code module;
and generating a second target applet according to the new association relation of the father and son warehouses.
The invention also provides an applet development system for realizing the applet development method, which comprises the following steps:
a service module acquisition unit that acquires each service module associated with an applet to be developed;
the basic module providing unit is used for providing a Taro basic template and a native public basic module;
the source code creating unit is used for creating at least one Taro source code module based on the Taro basic template; each Taro source code module corresponds to one service module;
the source code compiling unit is used for integrating and compiling each Taro source code module to obtain a compiling product; and
and the target applet generating unit integrates the compiling product and the native public basic module, generates a first target applet and issues the first target applet.
The invention also provides an applet development device comprising:
a processor;
a memory in which an executable program of the processor is stored;
wherein the processor is configured to perform the steps of any of the applet development methods described above via execution of the executable program.
The present invention also provides a computer-readable storage medium storing a program which, when executed by a processor, implements the steps of any of the applet development methods described above.
Compared with the prior art, the invention has the following advantages and outstanding effects:
according to the applet development method, the system, the equipment and the storage medium, each service of the applet to be realized is analyzed to obtain a plurality of service modules, and the Taro source code modules corresponding to each service module are rapidly developed based on the provided Taro basic templates associated with the Taro frames and integrated with the original public basic modules, so that the applet can run on a plurality of different applet platforms by writing only one set of codes; excessive repeated development work of the applet is avoided, and development efficiency of the applet running on different platforms is improved;
on the other hand, the method is beneficial to flexibly multiplexing the Taro source code module, other small programs are quickly built according to the service line requirements, and the multiplexing efficiency of the source code in different scenes is improved.
Drawings
Other features, objects and advantages of the present invention will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the following drawings.
FIG. 1 is a schematic diagram of an applet development method according to an embodiment of the invention;
FIG. 2 is a schematic diagram of an applet development method according to another embodiment of the invention;
FIG. 3 is a schematic diagram of an applet development method according to another embodiment of the invention;
FIG. 4 is a schematic diagram of an applet development method according to another embodiment of the invention;
FIG. 5 is a schematic diagram of an applet development method according to another embodiment of the invention;
FIG. 6 is a schematic diagram of an applet development method according to another embodiment of the invention;
FIG. 7 is a schematic diagram of an applet development system according to an embodiment of the invention;
FIG. 8 is a schematic diagram of an applet development apparatus according to one embodiment of the invention;
fig. 9 is a schematic structural diagram of a computer readable storage medium according to an embodiment of the present invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the example embodiments may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art. The same reference numerals in the drawings denote the same or similar structures, and thus a repetitive description thereof will be omitted.
In order to facilitate a better understanding of the technical solutions in the embodiments of the present application, the following exemplary descriptions are given to the technical terms related to the embodiments of the present application:
js (JavaScript ) file: a text file with suffix name js. JavaScript is an interpreted scripting language, a dynamic type, weak type, prototype-based language, built-in support type. JavaScript has been widely used in Web application development, and is often used to add various dynamic functions to a Web page, so as to provide a smoother and more beautiful browsing effect for users.
Packaging: the tool is used for compiling, mixing and compressing a plurality of js files to finally combine the js files into one js file, so that the purpose of reducing the number of the js files loaded on the page and the file size is achieved, and the method is a technical scheme which is frequently used in the current front-end development. In the embodiment of the application, the js file may be packaged by a weback (web packaging) tool.
Webpack: webpack is a Node front-end resource loading/packaging tool that performs static analysis based on the dependency of modules, and then generates corresponding static resources for the modules according to specified rules.
NPM: (Node Package Manager, node packet manager), NPM is a packet management tool installed along with the NodeJS, and can solve many problems in deployment of the NodeJS code, and the following common usage scenarios are available:
1. allowing the user to download the third party package written by others from the NPM server to local use.
2. Allowing the user to download and install the command line program written by someone else from the NPM server for local use.
3. Allowing the user to upload self-written packages or command line programs to the NPM server for use by others.
The NPM server may be an independent physical server, or may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and artificial intelligence platforms, and the like. The terminal may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a smart voice interaction device, a smart home appliance, a vehicle-mounted terminal, and the like. The terminal and the server may be directly or indirectly connected through wired or wireless communication, which is not limited herein.
In the prior art, a completely new applet needs to be run on different platforms, or a plurality of functions need to be redeveloped to run on different platforms on the basis of an existing applet, so that the cost of writing a plurality of sets of codes for different platforms is obviously very high, the development period is also long, and how to improve the development efficiency of the applet codes under the condition is a problem at present.
Based on the above problems, as shown in fig. 1, an embodiment of the present invention discloses an applet development method, which includes the following steps:
s110, acquiring each service module associated with the applet to be developed. Specifically, the business of the applet to be developed is analyzed and split, and all corresponding business modules are obtained. For example, the service modules obtained by decomposition can comprise an air ticket service, a train ticket service, a hotel service and the like.
S120, providing a Taro basic template and a native public basic module. In particular, the native public basic module can be developed according to grammar rules prescribed by the official of the applet, and can provide basic functions such as payment, user login, burial point and the like.
A Taro base template is provided that can set customized compilation configurations, plug-ins, and base component classes. That is, the Taro base template is associated with a Taro framework, and belongs to a development template based on Taro framework expansion.
S130, creating at least one Taro source code module based on the Taro basic template. Each Taro source code module corresponds to one service module. I.e. the Taro source code modules are in one-to-one correspondence with the service modules described above. In the step, according to the Taro basic template, the service function of each service module is developed based on the specification of the Taro framework, and a Taro source code module corresponding to each service module is generated.
And S140, integrating and compiling the Taro source code module to obtain a compiling product. The Taro basic template provides a unified Taro project structure, development specifications and compiling mode.
And S150, integrating the compiling product and the native public basic module to generate a first target applet and issuing the first target applet. In the implementation, each Taro source code module and the Taro basic template are provided with sub-warehouses for storing the modules, the target applet pulls up the latest codes of all sub-warehouses, acquires a Taro source code module list and a corresponding release version number used by the current target applet project from the applet management platform, pulls up the release codes of each Taro source code module into a container according to the release version number, integrates the Taro source code module and the Taro source code into a complete applet project, and submits the complete applet project to a server of a corresponding applet platform such as a WeChat through an automatic ci tool.
In some alternative embodiments, as shown in fig. 2, on the basis of the corresponding embodiment of fig. 1, between step S140 and step S150, the method further includes the steps of:
s141, acquiring a storage warehouse of Taro source code modules corresponding to each service module.
S142, generating sub-packet path information corresponding to each Taro source code module according to the storage warehouse of each Taro source code module.
Step S150 is replaced with step S151:
s151, integrating the compiling product and the native public basic module to generate a first target applet and issuing the first target applet; and adding the sub-package path information corresponding to each Taro source code module into the project configuration corresponding to the first target applet.
Specifically, in this embodiment, each Taro source code module adopts a binning development mode, that is, the Taro source code module of each service line is stored in a separate git warehouse. The Taro modules are respectively stored in different warehouses, so that the independence of code submitting operation of each business warehouse can be maintained. And generating sub-package paths corresponding to each Taro source code module, so that the situation that files between service lines are covered mutually or page paths conflict when merging projects can be avoided, and the scene of multi-team collaborative development can be met.
Optionally, step S142 further includes: and carrying out isolation processing on the sub-package path information corresponding to each Taro source code module. That is, the sub-packet paths are isolated according to each service module, the sub-packet root directory can be, for example, "pages/service line English abbreviations", and the files of each Taro source code module are placed in the own sub-packet paths, so that the source code files of each service line are effectively isolated; therefore, the situation that the file coverage or page path conflict among service lines occurs when merging projects is further avoided, and the scene of multi-team collaborative development can be met.
In another embodiment of the present application, another applet development method is disclosed. The method is based on the corresponding embodiment of fig. 1, and the applet to be developed is formed based on the native code construction. As shown in fig. 3, step S150 is replaced with step S152:
and S152, integrating the compiling product, the native public basic module and the native code associated with the applet to be developed to obtain a first target applet.
This embodiment is applicable to situations where the applet is currently running on a platform, but is developed using non-Taro framework techniques, i.e., where the applet has a set of existing native code. Copying the compiled product into the corresponding applet item of the existing native code, and merging or replacing the file to form a first target applet, namely a new applet. This enables code fusion of the first object applet developed based on the Taro framework technique and the applet project developed based on the non-Taro framework technique.
In another embodiment of the present application, another applet development method is disclosed. As shown in fig. 4, the method includes, based on the corresponding embodiment of fig. 3, step S140:
s143, identifying placeholders in each Taro source code module.
S144, determining a root path for referring to the file in the applet to be developed in the Taro source code module according to the placeholder.
And S145, compiling the Taro source code module according to the placeholder and the root path to obtain a compiling product and a relative path for referring to the file. The compilation product includes the relative path.
Specifically, placeholders, path replacement plug-ins, and Taro native hybrid plug-ins are provided in the Taro base template. The @/minuapp identifier in the Taro code is identified during compilation, and the native module reference path is dynamically computed and modified. The path replacement plug-in performs the associated processing logic in weback compilation hook modification build dassets: firstly, module references beginning with @/miniapp in all compiled product files are searched, then the root path of an applet is found according to the path of the current product, and the @/miniapp character string is replaced by the relative path of the current file relative to the root path, so that the Taro source code module references file contents in the original project, such as js files, js modules or APIs. The Taro native hybrid plug-in is to move the Taro compiled product to a specified location and to implement initialization of Taro public js in the entry file of the native applet. This facilitates code fusion of the first target applet developed based on the Taro framework technique and the applet project developed based on the non-Taro framework technique.
In another embodiment of the present application, another applet development method is disclosed. As shown in fig. 5, the method includes, based on the corresponding embodiment of fig. 1, step S140:
s146, obtaining the configuration information of the sub-package structure corresponding to each Taro source code module.
S147, generating public code extraction configuration information of a preset packaging tool and a sub-packaging public file path according to the sub-packaging structure configuration information.
S148, extracting configuration information and a sub-package public file path according to the public codes, and packaging the sub-package public file from a third party module on which the Taro source code module depends.
S149, integrating and compiling the Taro source code module to obtain a compiling product.
Specifically, the preset packaging tool may provide a common module packaging scheme for weback, taro base templates, that is, provide compiling configurations of two third party dependent packages. The developer may package the pure js third-party modules on demand using npm run buildCommon commands and package the Taro base components on demand using npm run buildCommonOrigin commands. On one hand, only the used third party module can be compiled into subcontracting through local precompilation operation, so that the existence of independent files is avoided; on the other hand, the buildCommonOrigin packaging command copies the file under the dependent node_modules as it is and places the file under the packaging directory, so that the situation that Taro cannot analyze the dependent @ tarojs/component base assembly due to the change of the writing mode of the reference @ tarojs/component in the third party module after compiling is avoided, and the condition that the @ tarojs/component base assembly is packaged into the base template file of the main package completely is avoided, and the abrupt increase of unnecessary codes in the main package is avoided; the method is beneficial to optimizing the volume of a Taro code compiling product, reducing the compiling time consumption, reducing the size of an applet code package, improving the loading speed of the applet application and optimizing the user experience.
In another embodiment of the present application, another applet development method is disclosed. Based on the above corresponding embodiment of fig. 1, step S140 includes:
and S1491, acquiring a release warehouse corresponding to the first target applet.
S1492, a first sub-warehouse corresponding to each Taro source code module and a second sub-warehouse corresponding to each Taro base template are obtained.
And S1493, establishing a father-son warehouse association relation between the first son warehouse and the release warehouse and between the second son warehouse and the release warehouse respectively.
Step S150 is replaced with step S153: and generating a first target applet according to the compiling product and the association relation of the father-son warehouse.
Therefore, after the Taro source code module is developed, the association among warehouses can be quickly established, and the applet project can be quickly constructed.
In some embodiments of the present application, as shown in fig. 6, on the basis of the above embodiment, the method further includes the steps of:
s160, taro module configuration information stored in the server side is obtained.
S170, acquiring a corresponding target Taro source code module according to the Taro module configuration information.
S180, establishing a new association relationship between the father and son warehouses according to the second sub-warehouse corresponding to the original public basic module and the target Taro source code module.
And S190, generating a second target applet according to the new association relation of the father and son warehouses.
Specifically, the information of the Taro source code module required by constructing a new applet can be determined by changing the configuration information of the Taro module, the target Taro module source codes required by the user can be quickly cloned by utilizing the function of the acquisition submodule of the git submodule tool, and the appointed codes of the warehouse corresponding to each target Taro source code module can be pulled at any time; as the git sub module allows one warehouse to serve as a sub-catalog of a plurality of warehouses, different target Taro source code modules can be selected, the warehouses are combined into a new sub-warehouse by combining with a second sub-warehouse corresponding to the original public basic module, the release warehouse corresponding to the second target applet serves as a father warehouse, and the configuration information of the Taro modules is combined for use together by combining with each applet, so that the effect of dynamically introducing the Taro source code modules according to the configuration can be realized. By combining all the Taro source code modules, new applet items can be quickly obtained, so that multiplexing of the Taro source code modules in different scenes is improved, and flexible multiplexing capability of the Taro modules is improved.
In other embodiments of the present invention, based on the corresponding embodiment of fig. 1, in step S140, a cache function of a barbel-loader (compiler-file preprocessor) may be started and/or a cache is used as a preprocessor for processing a part of a file during compiling. Therefore, the method is favorable for optimizing the packing compiling speed, reducing the compiling time consumption and improving the development efficiency of the applet.
It should be noted that, all the embodiments disclosed in the present application may be freely combined, and the technical solution obtained after combination is also within the protection scope of the present application.
As shown in fig. 7, an embodiment of the present invention further discloses an applet development system 7, which includes:
the service module acquisition unit 71 acquires each service module associated with an applet to be developed.
The base module providing unit 72 provides Taro base templates and native public base modules.
The source code creation unit 73 creates at least one Taro source code module based on the Taro base template described above. Each Taro source code module corresponds to one service module.
The source code compiling unit 74 integrates and compiles the Taro source code modules to obtain a compiled product. and
The target applet generating unit 75 integrates the compiled product and the native public base module to generate and issue a first target applet.
It will be appreciated that the applet development system of the present invention also includes other existing functional modules that support the operation of the applet development system. The applet development system shown in fig. 7 is only an example and should not be construed as limiting the functionality and scope of use of embodiments of the invention.
The applet development system in this embodiment is used to implement the above-mentioned applet development method, so for the specific implementation steps of the applet development system, reference may be made to the above description of the applet development method, which is not repeated here.
The embodiment of the invention also discloses an applet development device, which comprises a processor and a memory, wherein the memory stores an executable program of the processor; the processor is configured to perform the steps in the applet development method described above via execution of the executable program. Fig. 8 is a schematic diagram of the structure of the applet development apparatus disclosed in the present invention. An electronic device 600 according to this embodiment of the invention is described below with reference to fig. 8. The electronic device 600 shown in fig. 8 is merely an example, and should not be construed as limiting the functionality and scope of use of embodiments of the present invention.
As shown in fig. 8, the electronic device 600 is in the form of a general purpose computing device. Components of electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one memory unit 620, a bus 630 connecting the different platform components (including memory unit 620 and processing unit 610), a display unit 640, etc.
Wherein the storage unit stores program code that is executable by the processing unit 610 such that the processing unit 610 performs the steps according to various exemplary embodiments of the present invention described in the above-described applet development method section of the present specification. For example, the processing unit 610 may perform the steps as shown in fig. 1.
The storage unit 620 may include readable media in the form of volatile storage units, such as Random Access Memory (RAM) 6201 and/or cache memory unit 6202, and may further include Read Only Memory (ROM) 6203.
The storage unit 620 may also include a program/utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including, but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of which may include an implementation of a network environment.
Bus 630 may be a local bus representing one or more of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or using any of a variety of bus architectures.
The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboard, pointing device, bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 600, and/or any device (e.g., router, modem, etc.) that enables the electronic device 600 to communicate with one or more other computing devices. Such communication may occur through an input/output (I/O) interface 650. Also, electronic device 600 may communicate with one or more networks such as a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet, through network adapter 660. The network adapter 660 may communicate with other modules of the electronic device 600 over the bus 630. It should be appreciated that although not shown, other hardware and/or software modules may be used in connection with electronic device 600, including, but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, data backup storage platforms, and the like.
The invention also discloses a computer readable storage medium for storing a program which when executed implements the steps in the applet development method described above. In some possible embodiments, the aspects of the invention may also be implemented in the form of a program product comprising program code for causing a terminal device to carry out the steps according to the various exemplary embodiments of the invention as described in the applet development methods described in the present specification, when the program product is run on the terminal device.
As described above, when the program of the computer readable storage medium of this embodiment is executed, each service of the applet to be implemented is analyzed to obtain a plurality of service modules, and the Taro source code module corresponding to each service module is rapidly developed based on the provided Taro basic template associated with the Taro framework, and integrated with the native public basic module, so that it is possible to implement that only one set of code is written to run on a plurality of different applet platforms; excessive repeated development work of the applet is avoided, and development efficiency of the applet running on different platforms is improved.
Fig. 9 is a schematic structural view of a computer-readable storage medium of the present invention. Referring to fig. 9, a program product 800 for implementing the above-described method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium would include the following: an electrical connection having one or more wires, a portable disk, a hard disk, random Access Memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
The computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, with readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A readable storage medium may also be any readable medium that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
According to the applet development method, the system, the equipment and the storage medium, each service of the applet to be realized is analyzed to obtain a plurality of service modules, and the Taro source code modules corresponding to each service module are rapidly developed based on the provided Taro basic templates associated with the Taro frames and integrated with the original public basic modules, so that the applet can be operated on a plurality of different applet platforms by writing only one set of codes; excessive repeated development work of the applet is avoided, and development efficiency of the applet running on different platforms is improved;
on the other hand, the embodiment of the invention can flexibly combine the Taro source code modules according to the service line requirements, quickly build new other small programs and improve the multiplexing efficiency of the Taro source code modules in different scenes.
The foregoing is a further detailed description of the invention in connection with the preferred embodiments, and it is not intended that the invention be limited to the specific embodiments described. It will be apparent to those skilled in the art that several simple deductions or substitutions may be made without departing from the spirit of the invention, and these should be considered to be within the scope of the invention.

Claims (11)

1. A method of applet development comprising the steps of:
s110, acquiring each service module associated with an applet to be developed;
s120, providing a Taro basic template and a native public basic module;
s130, creating at least one Taro source code module based on the Taro basic template; each Taro source code module corresponds to one service module;
s140, integrating and compiling the Taro source code module to obtain a compiling product;
and S150, integrating the compiling product and the native public basic module, generating a first target applet and issuing the first target applet.
2. The applet development method according to claim 1, further comprising, between step S140 and step S150, the steps of:
acquiring a storage warehouse of Taro source code modules corresponding to each service module;
generating sub-packaging path information corresponding to each Taro source code module according to a storage warehouse of each Taro source code module;
step S150 further includes:
and adding the sub-package path information corresponding to each Taro source code module into the item configuration corresponding to the first target applet.
3. The applet development method as in claim 2, wherein step S140 further comprises:
and carrying out isolation processing on the sub-packet path information corresponding to each Taro source code module.
4. The applet development method as in claim 1, wherein the applet to be developed is formed based on native code construction; step S150 includes:
and integrating the native code associated with the applet to be developed based on the compiled product to obtain a first target applet.
5. The applet development method as in claim 4, wherein step S140 comprises:
identifying placeholders in each Taro source code module;
determining a root path for referencing a file in the applet to be developed in the Taro source code module according to the placeholder;
compiling each Taro source code module according to the placeholder and the root path to obtain a relative path for referencing the file; the compilation product includes the relative path.
6. The applet development method as in claim 1, wherein step S140 comprises:
acquiring the configuration information of the sub-package structure corresponding to each Taro source code module;
generating public code extraction configuration information of a preset packaging tool and a sub-packaging public file path according to the sub-packaging structure configuration information;
and extracting configuration information and a sub-packaging public file path according to the public codes, and packaging from a third party module on which the Taro source code module depends to obtain the sub-packaging public file.
7. The applet development method as in claim 1, wherein step S140 comprises:
acquiring a release warehouse corresponding to the first target applet;
acquiring a first sub-warehouse corresponding to each Taro source code module and a second sub-warehouse corresponding to the Taro basic template;
establishing a father-son warehouse association relation between the first son warehouse and the release warehouse and between the second son warehouse and the release warehouse respectively;
step S150 includes:
and generating a first target applet according to the association relation of the father and son warehouses.
8. The applet development method as in claim 7, further comprising the steps of:
acquiring Taro module configuration information stored in a server side;
acquiring a corresponding target Taro source code module according to the Taro module configuration information;
establishing a new association relationship between the father warehouse and the child warehouse according to the target Taro source code module;
and generating a second target applet according to the new association relation of the father and son warehouses.
9. An applet development system for implementing the applet development method of claim 1, said system comprising:
a service module acquisition unit that acquires each service module associated with an applet to be developed;
the basic module providing unit is used for providing a Taro basic template and a native public basic module;
the source code creating unit is used for creating at least one Taro source code module based on the Taro basic template; each Taro source code module corresponds to one service module;
the source code compiling unit is used for integrating and compiling each Taro source code module to obtain a compiling product; and
and the target applet generating unit integrates the compiling product and the native public basic module, generates a first target applet and issues the first target applet.
10. An applet development apparatus, comprising:
a processor;
a memory in which an executable program of the processor is stored;
wherein the processor is configured to perform the steps of the applet development method according to any one of claims 1 to 8 via execution of the executable program.
11. A computer-readable storage medium storing a program, wherein the program when executed by a processor implements the steps of the applet development method according to any one of claims 1 to 8.
CN202310356113.4A 2023-04-04 2023-04-04 Applet development method, system, device and storage medium Pending CN116360741A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310356113.4A CN116360741A (en) 2023-04-04 2023-04-04 Applet development method, system, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310356113.4A CN116360741A (en) 2023-04-04 2023-04-04 Applet development method, system, device and storage medium

Publications (1)

Publication Number Publication Date
CN116360741A true CN116360741A (en) 2023-06-30

Family

ID=86937695

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310356113.4A Pending CN116360741A (en) 2023-04-04 2023-04-04 Applet development method, system, device and storage medium

Country Status (1)

Country Link
CN (1) CN116360741A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116991380A (en) * 2023-09-21 2023-11-03 腾讯科技(深圳)有限公司 Application program construction method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116991380A (en) * 2023-09-21 2023-11-03 腾讯科技(深圳)有限公司 Application program construction method and device, electronic equipment and storage medium
CN116991380B (en) * 2023-09-21 2024-01-09 腾讯科技(深圳)有限公司 Application program construction method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US7281248B2 (en) Virtualized and realized user interface controls
US20090313004A1 (en) Platform-Independent Application Development Framework
US10949271B2 (en) Enhanced copy-and-paste
CN113126990B (en) Page development method, device, equipment and storage medium
CN109656617A (en) A kind of front end Web Service dispositions method, storage medium, electronic equipment and system
CN110688096B (en) Method and device for constructing application program containing plug-in, medium and electronic equipment
CN110716720A (en) Method and device for realizing application hot deployment
CN110059456A (en) Code protection method, code protection device, storage medium and electronic equipment
CN116360741A (en) Applet development method, system, device and storage medium
CN108845864B (en) Spring frame-based JVM garbage recycling method and device
CN114546583A (en) Containerized computing environment
Miravet et al. Framework for the declarative implementation of native mobile applications
CN113377342B (en) Project construction method and device, electronic equipment and storage medium
CN112631563A (en) System development method and device based on framework, computer equipment and storage medium
CN113902387A (en) Workflow processing method and device and electronic equipment
CN112835568A (en) Project construction method and device
KR20180131009A (en) System and method for converting large scale application
US9606775B2 (en) Developing rich internet application
CN116227625A (en) Intelligent model development method, medium and equipment
CN116431155A (en) Front-end application construction method, medium, device and computing equipment
CN112379885B (en) Applet compiling method, device, equipment and readable storage medium
CN115794253A (en) Application integration method and device, electronic equipment and computer readable storage medium
CN114168151A (en) Container-based program compiling method and device, electronic equipment and storage medium
CN114238831A (en) HTML code fragment processing method, system, electronic equipment and storage medium
CN113760292A (en) Method and device for developing application program, electronic 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