CN113254043A - Web front-end project processing method and device, electronic equipment and storage medium - Google Patents

Web front-end project processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113254043A
CN113254043A CN202110629215.XA CN202110629215A CN113254043A CN 113254043 A CN113254043 A CN 113254043A CN 202110629215 A CN202110629215 A CN 202110629215A CN 113254043 A CN113254043 A CN 113254043A
Authority
CN
China
Prior art keywords
service component
public
component module
project
page
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
CN202110629215.XA
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.)
Jingdong Technology Holding Co Ltd
Original Assignee
Jingdong Technology Holding 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 Jingdong Technology Holding Co Ltd filed Critical Jingdong Technology Holding Co Ltd
Priority to CN202110629215.XA priority Critical patent/CN113254043A/en
Publication of CN113254043A publication Critical patent/CN113254043A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Abstract

The application provides a Web front-end project processing method and device, electronic equipment and a storage medium. The Web front-end project comprises a business project and a public project, the business project comprises a plurality of sub-projects, and the public project comprises at least one public business component module in the plurality of sub-projects; the method comprises the steps of acquiring a code update file corresponding to each public service component module aiming at a requirement change request of the public service component module, packaging to obtain corresponding update files, and respectively storing the obtained update files into corresponding storage paths under public engineering; and according to the update file stored in the storage path under the public engineering, updating the page content of the Web front-end page containing the public service component module. The method and the device can improve the Web front-end development and deployment efficiency and reduce the code maintenance cost.

Description

Web front-end project processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for processing a Web front-end project, an electronic device, and a storage medium.
Background
In the daily management of an enterprise, a business line or a product line often includes a plurality of projects, and each project is not only related at a business level but also closely related at a code level. Typically, there will be some common modules between projects. For these shared modules, if the modules need to be modified according to the service requirements, the same modules of multiple projects need to be modified identically, so that the maintenance cost is high.
Disclosure of Invention
The application provides a Web front-end project processing method and device, electronic equipment and a storage medium.
According to a first aspect of the present application, a method for processing a Web front-end project is provided, where the Web front-end project includes a business project and a public project, the business project includes multiple sub-projects, and the public project includes at least one public service component module in the multiple sub-projects, where the method includes:
responding to a first change request aiming at the service component module, and acquiring a code update file corresponding to the public service component module according to the first change request;
packaging the corresponding code update files to obtain update files of the public service component modules, and respectively storing the update files of the public service component modules into storage paths under the public engineering;
and updating the page content of the Web front-end page containing the public service component module according to the update file stored in the storage path under the public engineering.
In some embodiments of the present application, the updating, according to the update file stored in the storage path under the public works, page content of a Web front-end page including the public service component module includes:
responding to the operation of opening the Web front-end page, and determining whether the common service component module exists in a target page corresponding to the operation;
responding to the existence of the public service component module in the target page, and determining a target storage address corresponding to the public service component module from code information in the target page;
and reading the corresponding update file from the storage path under the public engineering according to the target storage address, and rendering based on the read update file.
In some embodiments of the present application, the packaging the corresponding code update file to obtain an update file of the common service component module, and respectively storing the update file of the common service component module in a storage path under the public engineering includes:
respectively packaging the code update files of the public service component modules into single files corresponding to the public service component modules;
and storing the single file into a storage path under the public engineering.
In some embodiments of the application, at least one of the sub-projects comprises a non-common business component module, the method further comprising:
responding to a second change request aiming at the non-public service component module in a target sub-project, acquiring a corresponding code update file according to the second change request, packaging the corresponding code update file and storing the corresponding code update file into a storage path under the target sub-project;
in response to the operation of opening the page aiming at the target sub project, determining a storage address corresponding to the non-public service component module from the code information of the page;
and reading the corresponding packed file from the storage path under the target sub-project according to the storage address corresponding to the non-public service component module, and rendering based on the read packed file.
In addition, in the embodiment of the present application, the common service component module in the Web page of the sub-project is constructed in the form of a Widget, and the common service component module is accepted through a software development kit SDK.
According to a second aspect of the present application, there is provided a Web front end project processing apparatus, where the Web front end project includes a business project and a public engineering, the business project includes a plurality of sub-projects, the public engineering includes at least one public service component module in the plurality of sub-projects, the apparatus includes:
the first obtaining module is used for responding to a first change request aiming at the public service component module and obtaining a code update file corresponding to the public service component module according to the first change request;
the first processing module is used for packaging the corresponding code update files to obtain the update files of the public service component modules and respectively storing the update files of the public service component modules into storage paths under the public engineering;
and the page updating module is used for updating the page content of the Web front-end page containing the public service component module according to the updating file stored in the storage path under the public engineering.
In some embodiments of the present application, the page update module is specifically configured to:
responding to the operation of opening the Web front-end page, and determining whether the common service component module exists in a target page corresponding to the operation;
responding to the existence of the public service component module in the target page, and determining a target storage address corresponding to the public service component module from code information in the target page;
and reading the corresponding update file from the storage path under the public engineering according to the target storage address, and rendering based on the read update file.
In some embodiments of the present application, the first processing module is specifically configured to:
respectively packaging the code update files of the public service component modules into single files corresponding to the public service component modules;
and storing the single file into a storage path under the public engineering.
In an embodiment of the present application, at least one of the sub-projects includes a non-public service component module, and the apparatus further includes:
the second obtaining module is used for responding to a second change request aiming at the non-public service component module in the target sub-project and obtaining a corresponding code update file according to the second change request;
the second processing module is used for packaging the corresponding code update file and storing the code update file into a storage path under the target sub-project;
the determining module is used for responding to the operation of opening the page aiming at the target sub project and determining the storage address corresponding to the non-public service component module from the code information of the page;
and the page updating module is also used for reading a corresponding packed file from a storage path under the target sub-project according to the storage address corresponding to the non-public service component module, and rendering based on the read packed file.
In addition, in the embodiment of the present application, the common service component module in the Web page of the sub-project is constructed in the form of a Widget, and the common service component module is accepted through a software development kit SDK.
According to a third aspect of the present application, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of the first aspect.
According to a fourth aspect of the present application, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of the first aspect described above.
According to the technical scheme of the application, the Web front-end project is divided into the business project and the public project, the public business component module is managed in the public project, and the business project directly refers to the public business component module in the public project according to requirements to realize development of corresponding functions, so that the development cost and the maintenance cost are reduced, and the development efficiency is improved. According to the change request of each public service component module, synchronous updating of the Web front-end page when the Web front-end page is opened can be realized only by updating and packaging corresponding codes in public works, so that the cost waste caused by repeated deployment and repeated modification is avoided, and the condition that the Web front-end page is displayed inconsistently due to omission or untimely updating is also avoided.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
FIG. 1 is a block diagram of each system in a service line;
fig. 2 is a flowchart of a method for processing a Web front-end project according to an embodiment of the present application;
FIG. 3 is a diagram of the relationship between sub-projects and public projects in the business project A proposed by the embodiment of the present application;
FIG. 4 is a flow diagram of a proposed Web page content update according to an embodiment of the present application;
fig. 5 is an architecture diagram of a Web front-end project processing method according to an embodiment of the present application;
FIG. 6 is a flow chart of another Web front end project processing method according to an embodiment of the present application;
fig. 7 is a block diagram of a Web front-end item processing apparatus according to an embodiment of the present application;
FIG. 8 is a block diagram of another Web front-end item processing apparatus according to an embodiment of the present application;
fig. 9 is a block diagram of an electronic device for implementing a method of Web front-end item processing according to an embodiment of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that, in different Web front-end projects, the same business line or the same product line includes multiple projects, and because each project is related at the business level, different projects are also closely related at the code level. Fig. 1 is a structural diagram of each system in a certain service line, and as shown in fig. 1, each of the systems 1, 3, 5, and 6 includes a function 2, and the codes of the functions 2 of the systems are the same. Currently, each system is developed and deployed for function 2, which wastes development cost and affects code normative. In addition, if the requirement of the function 2 is changed, each system needs to be changed and deployed for the function 2, on one hand, the consistency of the function 2 of each system cannot be ensured, and on the other hand, the development cost is seriously wasted due to repeated modification and deployment.
Based on the problems, the application provides a Web front-end project processing method, a Web front-end project processing device, electronic equipment and a storage medium, and one-time development, one-time deployment and multiple-time application of a multi-project public module are realized, so that the development efficiency is improved.
Fig. 2 is a flowchart of a method for processing a Web front-end project according to an embodiment of the present application. The Web front-end item processing method provided in the embodiment of the present application is applicable to a Web front-end item processing apparatus. Wherein the Web front-end item processing device can be configured in an electronic device.
It should be noted that the Web front-end project includes business engineering and public engineering. The business project comprises a plurality of sub projects, and the public project comprises at least one public business component module in the plurality of sub projects. That is, in the business projects in the Web front-end project, each business project may include a plurality of sub-projects, and the same function may exist in the front-end pages corresponding to different sub-projects. Therefore, in the embodiment of the application, the front-end project is divided into the business project and the public project, wherein the public business component module in the public project corresponds to the same function in different sub-projects, so that each sub-project can directly refer to the public business component module to realize the related function, and repeated development is not needed. In addition, when the requirements of the same functions in each sub-project are changed, because the common service component modules in the public projects are directly quoted by each sub-project, the corresponding common service component modules in the public projects only need to be subjected to code modification and deployment online, and repetitive development and deployment are not needed.
As an example, FIG. 3 is a diagram illustrating the relationship between sub-projects and public projects in A business project. As shown in fig. 3, a plurality of sub-projects in the service project a all need a common service component module B, so the common service component module B is created in the common project a, and the sub-projects that need the function can directly refer to the common service component module B in the common project a, so that each sub-project does not need to repeatedly develop the function. In addition, if the public service component module B is required to be changed, developers only modify and deploy the public service component module B in the public engineering A according to the change requirement, and the corresponding sub-engineering can be updated synchronously without repeated development and deployment of processes.
Next, a detailed description will be made of an implementation manner of the Web front-end item processing method proposed in the embodiment of the present application, and as shown in fig. 2, the method includes the following steps:
step 201, responding to a first change request aiming at a common service component module, and acquiring a code update file corresponding to the common service component module according to the first change request.
It can be understood that the public works include at least one public service component module, and if the service requirement changes, the code of the corresponding public service component module also needs to be modified correspondingly. The first change request refers to a change request related to the related common service component module.
In the embodiment of the application, when a change request about a common service component module is received, a relevant code maintainer can modify a code according to the change request aiming at the corresponding common service component module in a public project. If the first change request has a plurality of or the first change request relates to a plurality of public service component modules, the relevant code personnel modify the codes of each related public service component module according to each change request. And obtaining a code update file corresponding to the common service component module based on the code modification.
Step 202, packaging the corresponding code update files to obtain update files of the public service component modules, and respectively storing the update files of the public service component modules into storage paths under public engineering.
That is, the code update files corresponding to the common service component modules need to be packaged respectively and uploaded to the corresponding storage paths under the public works, so as to update the functions of the corresponding common service component modules in the public works. It should be noted that, in public works, each common service component module corresponds to a unique storage path. Therefore, after the code update files corresponding to the common service component modules are packaged, the code update files need to be stored in the storage paths corresponding to the common service component modules under the public engineering respectively.
In order to ensure the integrity of each public service component module in public works during each update, the code update files of the public service component modules can be packed into single files corresponding to the public service component modules respectively during actual operation; then, the single file is stored in a storage path under public works. The code updating file is packaged into the corresponding single file, so that the packaged files corresponding to the common service component module are not missed when being stored respectively, and errors are avoided. On the other hand, after the single file corresponding to the common service component module is stored in the public engineering, the updating of the corresponding common service component module can be completed, and the situation that only part of functions are updated due to different storage completion time when a plurality of packed files are stored is avoided.
And step 203, updating the page content of the Web front-end page containing the public service component module according to the update file stored in the storage path under the public engineering.
That is, if there is a common service component module of a change request in the Web front-end page, when the corresponding Web front-end page is opened, the corresponding update content is directly loaded according to the update file stored in the storage path under the public engineering, thereby completing the update of the content of the corresponding Web front-end page.
According to the Web front-end project processing method, the Web front-end project is divided into the business project and the public project, the public business component module is managed in the public project, and the business project directly refers to the public business component module in the public project according to the requirement to realize the development of the corresponding function, so that the development cost and the maintenance cost are reduced, and the development efficiency is improved. According to the change requirement of each public service component module, synchronous update of the Web front-end page can be realized only by updating and packaging corresponding codes in public works, so that the cost waste caused by repeated deployment and repeated modification is avoided, and the condition that the Web front-end page display is inconsistent due to missing or untimely update is also avoided.
For the method for processing the Web front-end project provided in the above embodiment, when there is a change request for the common service component module, the corresponding update of the Web front-end page content may be implemented in the following manner. Fig. 4 is a flowchart of content update of a Web front end page in the embodiment of the present application. As shown in fig. 4, based on the above embodiment, the updating of the Web front end page content may include the following steps:
step 401, in response to an operation of opening a Web front-end page, determining whether a common service component module exists in a target page corresponding to the operation.
It can be understood that if a common function exists in a plurality of sub-projects of a business project, the common function can be created as a common business component module in the public project, and the code corresponding to the sub-project requiring the function can refer to the corresponding common business component module, so that the development of the related function is realized. Therefore, when a Web front-end page is opened, it is necessary to determine whether a common service component module is referenced in a code corresponding to the page that needs to be opened currently. If the public service component module is introduced, the code file corresponding to the public service component module needs to be acquired to ensure the realization of the corresponding function in the currently opened Web page.
Step 402, responding to the existence of the common service component module in the target page, and determining a target storage address corresponding to the common service component module from the code information in the target page.
Because each public service component module has a unique storage path in the public engineering, when the public service component module needs to be referred by the service sub-engineering, the storage position of the public service component module needing to be referred in the public engineering is written in the code corresponding to the service sub-engineering, so that the realization of related functions is facilitated. The storage location may include a prefix and a domain name corresponding to the public engineering, and a storage path of the referenced public service component module in the public engineering.
In the embodiment of the present application, if a common service component module exists in a target page, in order to ensure that the function of the common service component module in the target page is implemented, an update file corresponding to the common service component module needs to be found. That is, the target storage address corresponding to the common service component module needs to be determined in the code information corresponding to the target page, so as to find the update file of the common service component module.
And 403, reading a corresponding update file from the storage path under the public engineering according to the target storage address, and rendering based on the read update file.
It can be understood that, since the target storage address includes the prefix and the domain name of the public engineering and the storage path corresponding to the public service component module, the corresponding update file can be found in the storage path of the public engineering according to the target storage address. At this time, the code in the packed file is read for rendering, and the corresponding function in the Web front-end page can be realized.
In the embodiment of the application, if the common service component module is updated according to the requirement change request, the read corresponding packaged files are all updated packaged files, that is, after the common service component module is updated in the public engineering, other Web front-end pages referring to the common service component module are updated, and when the opening operation is executed, the displayed functions related to the common service component module are also updated. Therefore, the corresponding function content in the Web front-end page which refers to the public service component module can be updated by updating the package file of the public service component module under the public engineering without updating the Web front-end page code.
According to the Web front-end project processing method, each public service component module corresponds to a unique storage path in public engineering, the storage address of the corresponding public service component module is directly quoted in the Web front-end page code, and when the Web front-end page is opened, the corresponding file is directly read according to the storage address quoted in the page code. Therefore, when a change request exists for the public service component module, after the public service component module is updated, when a Web front-end page is opened, the corresponding update file can be directly read according to the memory address quoted in the page code, and the update of the Web page content is completed, so that the synchronous update of the Web front-end page is realized, the cost waste caused by repeated deployment and repeated modification is avoided, and the development efficiency is improved.
To further explain the above Web front-end project processing method, the construction and application of the common service component module will be described based on the above embodiments.
Fig. 5 is an architecture diagram of a Web front-end item processing method according to an embodiment of the present application. As shown in fig. 5, in order to achieve more friendly experience and facilitate management, the common service component module in the Web page of each sub-project may be constructed in the form of a Widget, and the common service component module is accepted through a software development kit SDK.
Widget is a small-sized Web application, developed using the existing standard Web technology like a general Web page, and includes HTML (HyperText Mark-up Language), CSS (cascading style Sheet, which is a set of format setting rules), JavaScript (a client scripting Language), XML (Extensible Markup Language), and Ajax (Asynchronous JavaScript and XML). The most significant difference from a common web page is that it does not rely on a browser display frame and is designed to have specific functions, such as stock, weather forecast, clock, games, etc. Because the Widget is small, exquisite, light, complete in function and updatable, the Widget is widely applied to the field of software development at present so as to enhance the user experience and improve the development efficiency.
For the implementation manner of constructing the common service component module in the form of Widget, a command-line interface (CLI) having functions of local services related to project creation, page creation, Widget creation, construction, and service development may be used. As shown in fig. 4, the CLI based on the above functions forms a common service component module scaffold, so as to implement creation, management and maintenance of a common project and each common service component module.
In addition, in order to manage the public functions in different sub-projects in a more friendly way, the public service component module is accepted through the SDK, and the public service component module is used according to the storage address of the public service component module introduced in each sub-project.
According to the Web front-end project processing method provided by the embodiment of the application, the public service component module is constructed in the form of the Widget, so that the interaction experience of the Web page is improved, and SEO (Search Engine Optimization) of the page content is not influenced. In addition, each sub-project receives the common service component module through the software development kit SDK, so that on one hand, the management of the common service component module can be effectively realized, on the other hand, the correspondence between each common service component module and the service project is facilitated, the reference of each sub-project to the common service component module is more standard, and the development efficiency is improved.
In addition, since each sub-project of the business project may also include non-common business component modules, that is, besides common functions, there may be some functions specific to the current sub-project. The specific functions of the sub-projects can be directly developed and deployed in the corresponding sub-projects. Next, another Web front-end project processing method will be proposed for the non-common service component module.
Fig. 6 is a flowchart of another method for processing a Web front-end project according to an embodiment of the present application. As shown in fig. 6, based on the above embodiment, the method further includes:
step 601, responding to a second change request aiming at a non-public service component module in the target sub-project, acquiring a corresponding code update file according to the second change request, packaging the corresponding code update file, and storing the packaged code update file into a storage path under the target sub-project.
It can be understood that if a non-common service component module exists in a sub-project, the code file of the non-common component module can be directly stored in the storage path under the current sub-project. If the non-public service component module needs to be changed, that is, the function of the non-public service component module needs to be modified, the corresponding developer modifies the code of the related non-public service component module according to the change requirement, so as to obtain a code update file.
In the embodiment of the application, if the non-public service component module in the target sub-project has a change requirement, a code update file is acquired aiming at the modification of a developer to a code, and is packaged and stored in a storage path under the target sub-project, so that the deployment and the on-line of the corresponding non-public service component module are realized. It should be noted that, in order to facilitate management of the non-common service component modules in the sub-project, each non-common service component module may have a unique storage path in the corresponding sub-project, and if a certain non-common service component module needs to be updated, the update code file of the non-common service component module is packaged and stored in the corresponding storage path.
Step 602, in response to the operation of opening the page for the target sub-project, determining a storage address corresponding to the non-public service component module from the code information of the page.
It will be appreciated that when the target sub-project page is opened, the page needs to be loaded according to the requested content. In order to improve the loading speed of the page, the non-public functions in the page can be divided into different non-public service component modules during page development, so that the front-end development is divided into controllable small blocks. And meanwhile, storing the non-public service component modules in the sub-project into corresponding storage paths under the sub-project. In this way, in the page code of the sub-project, each related non-public function is attached with the storage address corresponding to the non-public service component module, and when the page is loaded, the code for reading the corresponding file is obtained according to the storage address, so that the page content is obtained.
Step 603, reading a corresponding packed file from a storage path under the target sub-project according to the storage address corresponding to the non-public service component module, and rendering based on the read packed file.
It should be noted that, if the non-public service component module in the target sub-project page is updated according to the change of the requirement, when the target sub-project page is opened, the packaged file is obtained through the storage address corresponding to the non-public service component module to be rendered, and the function of the displayed non-public service component module is also updated.
According to the Web front-end project processing method, the non-public functions in the target sub-project are divided into the non-public service component modules, and the code files of the non-public service component modules are stored in the storage path under the target sub-project, so that the front-end development is light, and the maintenance cost of the codes is reduced. When the page of the target sub-project is opened, the corresponding code file is obtained according to the storage address of the non-public service component module in the sub-project code, page loading is realized, and therefore the loading speed of the front-end page is improved. In addition, aiming at the change requirement of the non-public service component module, the code update file after the code is modified is packaged and stored in the storage path under the corresponding sub-project, and the deployment of the change of the corresponding non-public service component module is completed, so that the updated non-public service component module can be obtained according to the storage path when the corresponding page is opened, and the development efficiency of a front-end project is improved.
In order to realize the method, the application provides a Web front-end project processing device.
Fig. 7 is a block diagram of a structure of a Web front-end item processing apparatus according to an embodiment of the present application. It should be noted that the Web front-end project includes a business project and a public project, the business project includes a plurality of sub-projects, and the public project includes at least one common business component module in the plurality of sub-projects. As shown in fig. 7, the Web front end item processing apparatus includes:
a first obtaining module 701, configured to, in response to a first change request for a common service component module, obtain, according to the first change request, a code update file corresponding to the common service component module;
the first processing module 702 is configured to package the corresponding code update files to obtain update files of the common service component modules, and store the update files of the common service component modules in storage paths under a public project respectively;
the page updating module 703 is configured to update the content of the page of the Web front end that includes the common service component module according to the update file stored in the storage path in the public engineering.
In some embodiments of the present application, the page update module 703 is specifically configured to:
responding to the operation of opening a Web front-end page, and determining whether a common service component module exists in a target page corresponding to the operation;
responding to the existence of the public service component module in the target page, and determining a target storage address corresponding to the public service component module from the code information in the target page;
and reading the corresponding update file from the storage path under the public engineering according to the target storage address, and rendering based on the read update file.
In some embodiments of the present application, the first processing module 702 is specifically configured to:
respectively packaging the code update file of each public service component module into a single file corresponding to each public service component module;
and storing the single file corresponding to each common service component module into a storage path under the public engineering.
In addition, in the embodiment of the application, the common service component module in the Web page of the sub-project is constructed in the form of a Widget, and the common service component module is accepted through a software development kit SDK.
According to the Web front-end project processing device provided by the embodiment of the application, a Web front-end project is divided into a business project and a public project, a public business component module is managed in the public project, and the business project directly refers to the public business component module in the public project according to requirements to realize development of corresponding functions, so that the development cost and the maintenance cost are reduced, and the development efficiency is improved. According to the change requirement of each public service component module, synchronous update of the Web front-end page can be realized only by updating and packaging corresponding codes in public works, so that the cost waste caused by repeated deployment and repeated modification is avoided, and the condition that the Web front-end page display is inconsistent due to missing or untimely update is also avoided.
In addition to the common functions, functions specific to each sub-project also exist in each sub-project, that is, in addition to the common business component modules, non-common business component modules also exist in each sub-project. The application provides another Web front-end project processing device aiming at a non-public service component module.
Fig. 8 is a block diagram of another Web front-end item processing apparatus according to an embodiment of the present application. In an embodiment of the application, at least one of the illustrated sub-projects includes a non-common business component module. As shown in fig. 8, on the basis of the above embodiment, the apparatus further includes:
a second obtaining module 804, configured to respond to a second change request for a non-public service component module in the target sub-project, and obtain a corresponding code update file according to the second change request;
the second processing module 805 is configured to package and store the corresponding code update file in a storage path under the target sub-project;
a determining module 806, configured to determine, in response to an operation of opening a page for a target sub-project, a storage address corresponding to a non-public service component module from code information of the page;
the page updating module 803 is further configured to read a corresponding packed file from a storage path under the target sub-project according to a storage address corresponding to the non-public service component module, and render based on the read packed file.
It should be noted that 801 to 803 in fig. 8 have the same functional structure as 701 to 703 in fig. 7, and are not described herein again.
According to the Web front-end project processing device, the non-public functions in the target sub-project are divided into the non-public service component modules, and the code files of the non-public service component modules are stored in the storage path under the target sub-project, so that the front-end development is light, and the maintenance cost of the codes is reduced. When the page of the target sub-project is opened, the corresponding code file is obtained according to the storage address of the non-public service component module in the sub-project code, page loading is realized, and therefore the loading speed of the front-end page is improved. In addition, aiming at the change requirement of the non-public service component module, the code update file after the code is modified is packaged and stored in the storage path under the corresponding sub-project, and the deployment of the change of the corresponding non-public service component module is completed, so that the updated non-public service component module can be obtained according to the storage path when the corresponding page is opened, and the development efficiency of a front-end project is improved.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
According to an embodiment of the present application, an electronic device and a readable storage medium are also provided.
As shown in fig. 9, it is a block diagram of an electronic device of a Web front-end item processing method according to an embodiment of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 9, the electronic apparatus includes: one or more processors 901, memory 902, and interfaces for connecting the various components, including a high-speed interface and a low-speed interface. The various components are interconnected using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions for execution within the electronic device, including instructions stored in or on the memory to display graphical information of a GUI on an external input/output apparatus (such as a display device coupled to the interface). In other embodiments, multiple processors and/or multiple buses may be used, along with multiple memories and multiple memories, as desired. Also, multiple electronic devices may be connected, with each device providing portions of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). Fig. 9 illustrates an example of a processor 901.
Memory 902 is a non-transitory computer readable storage medium as provided herein. Wherein the memory stores instructions executable by at least one processor to cause the at least one processor to perform the method of Web front end item processing provided herein. The non-transitory computer-readable storage medium of the present application stores computer instructions for causing a computer to perform the method of Web front-end item processing provided herein.
The memory 902, which is a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer executable programs, and modules, such as program instructions/modules corresponding to the method for Web front-end item processing in the embodiment of the present application (for example, the first obtaining module 701, the first processing module 702, and the page updating module 703 shown in fig. 7). The processor 901 executes various functional applications of the server and data processing, i.e., a method of implementing Web front-end item processing in the above-described method embodiments, by executing non-transitory software programs, instructions, and modules stored in the memory 902.
The memory 902 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created from use of the electronic device processed by the Web front end item, and the like. Further, the memory 902 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, the memory 902 may optionally include memory located remotely from the processor 901, which may be connected to an electronic device for Web front end item processing over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The electronic device of the method for Web front-end item processing may further include: an input device 903 and an output device 904. The processor 901, the memory 902, the input device 903 and the output device 904 may be connected by a bus or other means, and fig. 9 illustrates the connection by a bus as an example.
The input device 903 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device for Web front end item processing, such as an input device like a touch screen, a keypad, a mouse, a track pad, a touch pad, a pointer, one or more mouse buttons, a track ball, a joystick, etc. The output devices 904 may include a display device, auxiliary lighting devices (e.g., LEDs), tactile feedback devices (e.g., vibrating motors), and the like. The display device may include, but is not limited to, a Liquid Crystal Display (LCD), a Light Emitting Diode (LED) display, and a plasma display. In some implementations, the display device can be a touch screen.
Various implementations of the systems and techniques described here can be realized in digital electronic circuitry, integrated circuitry, application specific ASICs (application specific integrated circuits), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
These computer programs (also known as programs, software applications, or code) include machine instructions for a programmable processor, and may be implemented using high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, apparatus, and/or device (e.g., magnetic discs, optical disks, memory, Programmable Logic Devices (PLDs)) used to provide machine instructions and/or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal used to provide machine instructions and/or data to a programmable processor.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), the internet, and blockchain networks.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server can be a cloud Server, also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server may also be a server of a distributed system, or a server incorporating a blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present application may be executed in parallel, sequentially, or in different orders, and the present invention is not limited thereto as long as the desired results of the technical solutions disclosed in the present application can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (12)

1. A Web front-end project processing method is characterized in that a Web front-end project comprises a business project and a public project, the business project comprises a plurality of sub-projects, the public project comprises at least one public service component module in the sub-projects, and the method comprises the following steps:
responding to a first change request aiming at the public service component module, and acquiring a code update file corresponding to the public service component module according to the first change request;
packaging the corresponding code update files to obtain update files of the public service component modules, and storing the update files of the public service component modules into a storage path under the public engineering;
and updating the page content of the Web front-end page containing the public service component module according to the update file stored in the storage path under the public engineering.
2. The method according to claim 1, wherein the updating the page content of the Web front-end page including the common service component module according to the update file stored in the storage path under the public works comprises:
responding to the operation of opening the Web front-end page, and determining whether the common service component module exists in a target page corresponding to the operation;
responding to the existence of the public service component module in the target page, and determining a target storage address corresponding to the public service component module from code information in the target page;
and reading the corresponding update file from the storage path under the public engineering according to the target storage address, and rendering based on the read update file.
3. The method of claim 1, wherein the packaging the corresponding code update file to obtain the update file of the common service component module, and storing the update file of the common service component module in a storage path under the public engineering comprises:
respectively packaging the code update files of the public service component modules into single files corresponding to the public service component modules;
and storing the corresponding single file into a storage path under the public engineering.
4. The method of claim 1, wherein at least one of the sub-projects includes a non-common business component module, the method further comprising:
responding to a second change request aiming at the non-public service component module in a target sub-project, acquiring a corresponding code update file according to the second change request, packaging the corresponding code update file and storing the corresponding code update file into a storage path under the target sub-project;
in response to the operation of opening the page aiming at the target sub project, determining a storage address corresponding to the non-public service component module from the code information of the page;
and reading the corresponding packed file from the storage path under the target sub-project according to the storage address corresponding to the non-public service component module, and rendering based on the read packed file.
5. The method according to any one of claims 1 to 4, wherein the common service component module in the Web page of the sub-project is constructed in the form of a Widget, and the common service component module is hosted by a Software Development Kit (SDK).
6. A Web front-end project processing device is characterized in that a Web front-end project comprises a business project and a public project, the business project comprises a plurality of sub-projects, the public project comprises at least one public service component module in the sub-projects, and the device comprises:
the first obtaining module is used for responding to a first change request aiming at the public service component module and obtaining a code update file corresponding to the public service component module according to the first change request;
the first processing module is used for packaging the corresponding code update file to obtain an update file of the public service component module, and storing the update file of the public service component module into a storage path under the public engineering;
and the page updating module is used for updating the page content of the Web front-end page containing the public service component module according to the updating file stored in the storage path under the public engineering.
7. The apparatus of claim 6, wherein the page update module is specifically configured to:
responding to the operation of opening the Web front-end page, and determining whether the common service component module exists in a target page corresponding to the operation;
responding to the existence of the public service component module in the target page, and determining a target storage address corresponding to the public service component module from code information in the target page;
and reading the corresponding update file from the storage path under the public engineering according to the target storage address, and rendering based on the read update file.
8. The apparatus of claim 6, wherein the first processing module is specifically configured to:
respectively packaging the code update files of the public service component modules into single files corresponding to the public service component modules;
and storing the single file into a storage path under the public engineering.
9. The apparatus of claim 6, wherein at least one of the sub-projects comprises a non-common service component module, the apparatus further comprising:
the second obtaining module is used for responding to a second change request aiming at the non-public service component module in the target sub-project and obtaining a corresponding code update file according to the second change request;
the second processing module is used for packaging the corresponding code update file and storing the code update file into a storage path under the target sub-project;
the determining module is used for responding to the operation of opening the page aiming at the target sub project and determining the storage address corresponding to the non-public service component module from the code information of the page;
and the page updating module is also used for reading a corresponding packed file from a storage path under the target sub-project according to the storage address corresponding to the non-public service component module, and rendering based on the read packed file.
10. The apparatus according to any of claims 6 to 9, wherein the common service component module in the Web page of the sub-project is constructed in a form of Widget, and is hosted by SDK.
11. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5.
12. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-5.
CN202110629215.XA 2021-06-04 2021-06-04 Web front-end project processing method and device, electronic equipment and storage medium Pending CN113254043A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110629215.XA CN113254043A (en) 2021-06-04 2021-06-04 Web front-end project processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110629215.XA CN113254043A (en) 2021-06-04 2021-06-04 Web front-end project processing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113254043A true CN113254043A (en) 2021-08-13

Family

ID=77186584

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110629215.XA Pending CN113254043A (en) 2021-06-04 2021-06-04 Web front-end project processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113254043A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113778397A (en) * 2021-09-01 2021-12-10 粒子文化科技集团(杭州)股份有限公司 Page generation method and device, electronic device and storage medium
CN114968311A (en) * 2022-07-11 2022-08-30 云账户技术(天津)有限公司 Method, device, equipment and medium for determining regression range of upgrade version of component library

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108363564A (en) * 2018-01-23 2018-08-03 平安普惠企业管理有限公司 Entry modularization implementation method, device, terminal device and storage medium
CN108762729A (en) * 2018-05-07 2018-11-06 北京五八信息技术有限公司 A kind of method, apparatus of page makeup, computer equipment and storage medium
CN108958796A (en) * 2017-05-23 2018-12-07 阿里巴巴集团控股有限公司 service request processing method and device, service request processing system
CN109683939A (en) * 2018-12-29 2019-04-26 北京小米移动软件有限公司 Component object update method, device and storage medium
CN109783744A (en) * 2018-12-05 2019-05-21 北京奇艺世纪科技有限公司 The page starts method, apparatus, terminal and computer readable storage medium
CN112416425A (en) * 2020-11-20 2021-02-26 微医云(杭州)控股有限公司 APP construction method and device, computer equipment and storage medium
CN112817591A (en) * 2021-01-26 2021-05-18 山东浪潮通软信息科技有限公司 Front-end page construction method and device
CN112882688A (en) * 2021-01-07 2021-06-01 中国人民财产保险股份有限公司 Cloud-based architecture supporting multi-front-end project access

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108958796A (en) * 2017-05-23 2018-12-07 阿里巴巴集团控股有限公司 service request processing method and device, service request processing system
CN108363564A (en) * 2018-01-23 2018-08-03 平安普惠企业管理有限公司 Entry modularization implementation method, device, terminal device and storage medium
CN108762729A (en) * 2018-05-07 2018-11-06 北京五八信息技术有限公司 A kind of method, apparatus of page makeup, computer equipment and storage medium
CN109783744A (en) * 2018-12-05 2019-05-21 北京奇艺世纪科技有限公司 The page starts method, apparatus, terminal and computer readable storage medium
CN109683939A (en) * 2018-12-29 2019-04-26 北京小米移动软件有限公司 Component object update method, device and storage medium
CN112416425A (en) * 2020-11-20 2021-02-26 微医云(杭州)控股有限公司 APP construction method and device, computer equipment and storage medium
CN112882688A (en) * 2021-01-07 2021-06-01 中国人民财产保险股份有限公司 Cloud-based architecture supporting multi-front-end project access
CN112817591A (en) * 2021-01-26 2021-05-18 山东浪潮通软信息科技有限公司 Front-end page construction method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李咏梅;: "基于应用程序块的智能客户端水文应用架构设计与实现", 新疆大学学报(自然科学版), no. 03 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113778397A (en) * 2021-09-01 2021-12-10 粒子文化科技集团(杭州)股份有限公司 Page generation method and device, electronic device and storage medium
CN114968311A (en) * 2022-07-11 2022-08-30 云账户技术(天津)有限公司 Method, device, equipment and medium for determining regression range of upgrade version of component library

Similar Documents

Publication Publication Date Title
US10419568B2 (en) Manipulation of browser DOM on server
CN111813742A (en) File management method, device, equipment and medium
CN113254043A (en) Web front-end project processing method and device, electronic equipment and storage medium
CN111984476A (en) Test method and device
CN111767089A (en) Method, device and equipment for loading file and storage medium
CN114036443A (en) Page generation method and device
CN112269706A (en) Interface parameter checking method and device, electronic equipment and computer readable medium
CN112506854A (en) Method, device, equipment and medium for storing page template file and generating page
CN111610972A (en) Page generation method, device, equipment and storage medium
CN114398023A (en) File generation method and page configuration method and device
EP3869377A1 (en) Method and apparatus for data processing based on smart contract, device and storage medium
CN112947916A (en) Method, device, equipment and storage medium for realizing online canvas
CN111966877A (en) Front-end service method, device, equipment and storage medium
CN111125597A (en) Webpage loading method, browser, electronic equipment and storage medium
CN113656533A (en) Tree control processing method and device and electronic equipment
CN114661274A (en) Method and device for generating intelligent contract
CN110599112A (en) Method and device for developing and maintaining network page
CN111857656B (en) Data processing method, device, electronic equipment and storage medium
CN111596897B (en) Code multiplexing processing method and device and electronic equipment
CN111274520B (en) Webpage resource auditing method, device, equipment and medium
CN114741294A (en) Page debugging method, device, equipment and storage medium
CN113254405A (en) File conversion method, device, equipment and medium
CN112306413A (en) Method, device, equipment and storage medium for accessing memory
CN111614494B (en) Network resource simulation method and device, electronic equipment and computer readable storage medium
KR102644170B1 (en) Method for assisting select of screen components and collect of coordinate information

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