CN112000334A - Page development method, device, server and storage medium - Google Patents

Page development method, device, server and storage medium Download PDF

Info

Publication number
CN112000334A
CN112000334A CN202010699783.2A CN202010699783A CN112000334A CN 112000334 A CN112000334 A CN 112000334A CN 202010699783 A CN202010699783 A CN 202010699783A CN 112000334 A CN112000334 A CN 112000334A
Authority
CN
China
Prior art keywords
page
folder
target
branch
development
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
CN202010699783.2A
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.)
Beijing Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information Technology 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 Beijing Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN202010699783.2A priority Critical patent/CN112000334A/en
Publication of CN112000334A publication Critical patent/CN112000334A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/72Code refactoring

Abstract

The disclosure relates to a page development method, a page development device, a server and a storage medium. The page development method comprises the following steps: creating a development branch of a target project, wherein the target project is a project comprising multiple pages, folders of the development branch comprise a first folder and a second folder, the first folder is used for storing public codes of the multiple pages, and the second folder is an empty folder or a folder in which example codes are stored; creating a target branch from the development branch, wherein the folder of the target branch comprises a third folder and a fourth folder, the third folder is used for storing public codes of multiple pages, and the fourth folder is an empty folder or a folder for storing example codes; and developing a target page in the target branch, and storing the page code corresponding to the target page in a fourth folder. By adopting the page development method, the page development device, the server and the storage medium, the problem of much time consumption when a certain page in a multi-page project is developed can be solved.

Description

Page development method, device, server and storage medium
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a page development method, an apparatus, a server, and a storage medium.
Background
A multi-page item refers to an item comprising a plurality of complete pages. For a multi-page project, when target page development is performed, other pages in the project often affect the development process of the target page.
Currently, in the related art, when a certain target page is developed, a target branch needs to be created from a main branch of a multi-page project, that is, common codes and page codes of all pages in a main branch folder need to be downloaded remotely. Before the target page is submitted, the target page needs to be compiled, converted into a language which can be recognized by a browser, and compressed and packaged. For a multi-page project, the data volume of page codes of multiple pages is extremely large, and the compiling and packaging process consumes time, so that the development process is influenced.
Disclosure of Invention
The disclosure provides a page development method, a page development device, a server and a storage medium, which are used for at least solving the problem that much time is consumed when a certain page of a multi-page project is developed in the related art.
The technical scheme of the disclosure is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a page development method, including: creating a development branch of a target project, wherein the target project is a project comprising multiple pages, folders of the development branch comprise a first folder and a second folder, the first folder is used for storing public codes of the multiple pages, and the second folder is an empty folder or a folder in which example codes are stored; creating a target branch from the development branch, wherein the folder of the target branch comprises a third folder and a fourth folder, the third folder is used for storing public codes of multiple pages, and the fourth folder is an empty folder or a folder for storing example codes; and developing a target page in the target branch, and storing the page code corresponding to the target page in a fourth folder.
According to a second aspect of the embodiments of the present disclosure, there is provided a page development apparatus including: the system comprises a first creation module, a second creation module and a third creation module, wherein the first creation module is configured to execute development branching for creating a target project, the target project is a project comprising multiple pages, folders of the development branching comprise a first folder and a second folder, the first folder is used for storing public codes of the multiple pages, and the second folder is an empty folder or a folder for storing example codes; the second creating module is configured to create a target branch from the development branch, the folder of the target branch comprises a third folder and a fourth folder, the third folder is used for storing public codes of multiple pages, and the fourth folder is an empty folder or a folder in which example codes are stored; a development module configured to execute development of a target page in a target branch; and the storage module is configured to store the page code corresponding to the target page in the fourth folder.
According to a third aspect of the embodiments of the present disclosure, there is provided a server, including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the page development method as described in the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a storage medium, wherein instructions in the storage medium, when executed by a processor of a server, enable the server to perform the page development method according to the first aspect.
According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product, wherein instructions of the computer program product, when executed by a processor of a server, enable the server to perform the page development method according to the first aspect.
The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects:
in the embodiment of the disclosure, when a multi-page project is developed, a target branch is created in a development branch of the multi-page project, a first folder of the development branch is used for storing common codes, a second folder of the development branch is an empty folder or a folder storing example codes, correspondingly, a third folder of the target branch created in the development branch is also used for storing the common codes, and a fourth folder of the target branch is also an empty folder or a folder storing the example codes. Therefore, when the target page is developed in the target branch, the page code of the whole project does not need to be downloaded, the page code of the target page only needs to be compiled and packaged before submission, and the page code of the whole project does not need to be downloaded, compiled and packaged, so that the development time is saved, and the development process is accelerated.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure and are not to be construed as limiting the disclosure.
FIG. 1 is a page development flow diagram illustrating a multi-page project, according to an example embodiment.
Fig. 2 is a schematic diagram illustrating a page development method, a page development apparatus, an electronic device, and a storage medium application environment according to an exemplary embodiment.
FIG. 3 is a flowchart illustrating a method of page development in accordance with an exemplary embodiment.
FIG. 4 is a diagram illustrating a data structure of a fourth folder, according to an example embodiment.
Fig. 5 is a flowchart illustrating a page identification information matching method according to an exemplary embodiment.
FIG. 6 is a page development flow diagram illustrating another multi-page project, according to an example embodiment.
FIG. 7 is a block diagram illustrating a page development apparatus in accordance with an exemplary embodiment.
FIG. 8 is a block diagram illustrating a server in accordance with an exemplary embodiment.
FIG. 9 is a block diagram illustrating an apparatus for data processing according to an example embodiment.
Detailed Description
In order to make the technical solutions of the present disclosure better understood by those of ordinary skill in the art, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the above-described drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the disclosure described herein are capable of operation in sequences other than those illustrated or otherwise described herein. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
For a multi-page project, when a target page in a multi-page project is developed, other pages in the project often affect the development process of the target page.
Fig. 1 is an example to illustrate a specific implementation manner of a multi-page project development target page in the related art.
FIG. 1 is a page development flow diagram illustrating a multi-page project, according to an example embodiment. As shown in FIG. 1, a development software or multi-page project includes a main branch 110 and a target branch 120. Where main branch 120 includes common code folder 112 and multi-page code folder 114 and target branch 120 includes common code folder 122 and page code folder 124.
In the specific implementation of the multi-page project development target page as shown in fig. 1, one main branch 110 is first copied as a target branch 120, and then the target page is developed in the target branch. The folder of the main branch 110 stores the common codes in the multi-page project and the page codes of all pages, and the page codes of all pages need to be downloaded remotely in the copying process, which consumes a lot of time and resources.
Also, the folder of the target branch 120 obtained by copying the main branch 110 also stores the common code in the multi-page item and the page codes of all pages. Therefore, before development is complete and ready for commit, the target branch needs to compile and package all the page codes in the multi-page code folder 124, wherein all the page codes include: the page code of the target page and the page code of other developed pages in the multi-page project. It takes a lot of time to compile and package all page codes.
The method and the device aim to solve the problems that when a target page in a multi-page project is developed in the related art, common codes and page codes of all pages in the project need to be downloaded remotely, and before the target page is submitted, the page codes of all pages need to be compressed and packaged, so that the page code downloading time is too long, the compiling and packaging time is too long, and further the development process is influenced.
The disclosure provides a page development method, a page development device, electronic equipment and a storage medium. According to the page development method, the device, the electronic equipment and the storage medium, when the target page development is carried out on the multi-page project, the target branch is created in the development branch of the multi-page project, and then the target page is developed in the target branch, so that the page code codes of the whole project do not need to be downloaded, the target page only needs to be compiled and packaged before submission, and the page codes of the whole project do not need to be downloaded, compiled and packaged, so that the development time is saved, and the development process is accelerated.
A multi-page project refers to a project or application having multiple complete pages, and the pages may be static pages or dynamic pages.
Compilation is the process of translating source code (typically a high-level language) into object code (typically a low-level or machine language) that can be directly executed by a computer or virtual machine, i.e., the process of using a compiler to generate an object program from a source program written in a source language. The compiling operation is performed on the page code, so that the language of the page code developed locally (at the user end) can be converted into the language recognizable by the target end (a computer or a browser). The packaging refers to a process of compressing folders corresponding to one or more pages, and the packaging can reduce the data size of transmitted data and reduce the storage space and transmission time.
Fig. 2 is a schematic view of an application environment of a page development method, an apparatus, an electronic device, and a storage medium according to one or more embodiments of the disclosure. As shown in fig. 2, the server 100 is communicatively connected to one or more user terminals 200 via a network 300 for data communication or interaction. The server 100 may be a web server, a database server, or the like. The user end 200 may be, but is not limited to, a Personal Computer (PC), a smart phone, a tablet computer, a Personal Digital Assistant (PDA), and the like. The network 300 may be a wired or wireless network.
The page development method provided by the embodiment of the present disclosure will be described in detail below.
The page development method provided by the embodiment of the disclosure can be applied to the user side 200, and for convenience of description, the embodiment of the disclosure is described by taking the user side 200 as an execution main body except for specific description. It is to be understood that the subject matter described is not to be construed as limiting the disclosure.
Next, a page development method provided by the present disclosure will be described first.
FIG. 3 is a flowchart illustrating a method of page development in accordance with an exemplary embodiment.
As shown in fig. 3, the page development method may include the following steps.
S310, creating a development branch of a target project, wherein the target project is a project comprising multiple pages, folders of the development branch comprise a first folder and a second folder, the first folder is used for storing public codes of the multiple pages, and the second folder is an empty folder or a folder in which example codes are stored.
And S320, creating a target branch from the development branch, wherein the folder of the target branch comprises a third folder and a fourth folder, the third folder is used for storing the public codes of the multiple pages, and the fourth folder is an empty folder or a folder stored with example codes.
S330, a target page is developed in the target branch, and page codes corresponding to the target page are stored in a fourth folder.
Specific implementations of the above steps will be described in detail below.
In the embodiment of the disclosure, the target branch is created in the development branch of the multi-page project, and then the target page is developed in the target branch, and the folder of the development branch is an empty folder or a folder in which example code is stored. Therefore, when the target page is developed, the page code of the whole project does not need to be downloaded, the page code of the target page only needs to be compiled and packaged before submission, and the page code of the whole project does not need to be downloaded, compiled and packaged, so that the development time is saved, and the development process is accelerated.
Specific implementations of the above steps are described below.
First, S310 is introduced.
A development branch of the target project is created, the development branch (i.e., develop branch) being a branch of the project being developed (i.e., the target project).
Specifically, a development branch of the target project is created from the main branch, the main branch is used for releasing the project of a new version, the development process needs to be completed on the other branch, namely the development branch, when the code of the development branch reaches a stable state to be released, the development branch can be merged into the main branch, namely the page code in the target project corresponding to the development branch is submitted to the main branch.
The folder of the development branch comprises a first folder and a second folder, wherein the first folder is used for storing the public codes of the multiple pages, and the second folder is an empty folder or a folder for storing the example codes.
The common code is a code which may be used by each page in a project for developing multiple pages, and mainly comprises: libraries, components, containers, and the like.
Wherein, the second folder mentioned above is an empty folder, that is, the second folder does not store any western code or resource; in the above mentioned case that the second folder stores example code, the example code (i.e. demo page code) of one or more pages under development in the development branch may be stored in the second folder, and generally, the example code is not much, but is much smaller than the page code of all pages in the multi-page project.
Illustratively, the second folder of the development branch may be created as an empty folder when the target branch is created, and the empty operation may also be performed on the second folder of the development branch in response to an empty request issued by a developer.
Here, since the second folder of the development branch is an empty folder or a folder storing example codes, a folder for storing page codes of a target branch created from the development branch may also be empty, and when the target branch develops a page, the page codes of the entire project do not need to be downloaded, so that the downloading (pulling codes) speed is increased, and the development process of the target branch can be accelerated.
In some embodiments of the present disclosure, optionally, the first folder comprises a first subfolder and a second subfolder, the first subfolder for storing multi-page library code; the second subfolder is for storing multi-page component code.
Library code or tool library code, i.e., a collection of well-established algorithms compiled into subroutines or functions, is collected for the developer to call.
Illustratively, converting the time stamp into time, adjusting the time format to the target format, and finally obtaining a specific time (e.g., "12: 00"), the conversion method or process is called library, or tool library.
The component code is code for implementing the functions of the component. The range of components is relatively wide, and a set of programs, a linked library, or even a class of code may be referred to as a component.
For example, for a game wheel, part of the logic of a plurality of game wheels is basically consistent, so that the existing code capable of realizing the function of the "wheel" can be directly introduced into the page to be developed currently, and the code for realizing the function of the "wheel" can be called component code.
Here, the different categories of common codes are separately stored, and management of common codes for multi-page items can be facilitated.
Then, S320 is introduced.
In some embodiments of the present disclosure, optionally, multiple target branches may be created from the development branch, the page code of the developed target branch may be submitted, the remaining target branches that are not developed may continue the development process, and the multiple target branches are developed independently without mutual interference.
In the step related to creating the target branch from the development branches, the steps may specifically be: one development branch is copied as a target branch. The first folder of the development branch stores the common code in the target project. The third folder of the target branch obtained by copying the development branch also stores the common code in the multi-page project. Further, the second folder of the development branch is empty or stores the example code, so the fourth folder of the target branch obtained by copying the development branch is also empty or stores the example code.
In some embodiments of the present disclosure, optionally, the target page includes a plurality of pages to be developed, and the fourth folder is used for storing page codes of the plurality of pages to be developed.
Specifically, the target branch may simultaneously develop a plurality of pages to be developed, and accordingly, the fourth folder of the target branch may be used to store page codes of the plurality of pages to be developed.
The target page comprises a plurality of pages to be developed, and when the page development is to be carried out, the pages to be developed in the pages to be developed are directly traversed in the fourth folder. For example, assume that the page to be developed in the target branch includes: and when the A page, the B page and the C page are prepared to be developed, the page code of the page A is found in the fourth folder of the target branch.
It will be appreciated that the target page may also have only one page to be developed. For example, if only a page is available, the page code of the a page may be found directly in the fourth folder of the target branch.
In the method, a plurality of pages to be developed are developed at the same time in the target branch, so that the development speed can be increased, and the development process of the target project can be promoted.
Finally, S330 is introduced.
In some embodiments of the present disclosure, optionally before S330, the page development method may further include the following steps:
receiving a development request for a first page in a plurality of pages to be developed, wherein the development request comprises first identification information corresponding to the first page; matching the first identification information with the identification information of each subfolder in the fourth folder to obtain second identification information matched with the first identification information; and determining the target subfolder corresponding to the second identification information as the subfolder corresponding to the first page.
Accordingly, the specific method of S330 may include:
and developing a first page in the target branch, and storing page codes corresponding to the first page in the target subfolder.
The step related to receiving a development request for a first page of the multiple pages to be developed, where the development request includes first identification information corresponding to the first page, may specifically be: in the page development process, a fixed path, namely a page path, is preset in each page, and a corresponding development page can be found through the page path. After the development request is obtained, a page with a page path matched with the first identification information in the multi-page project can be selected as a first page according to the first identification information carried in the development request, namely, the page needing development.
For example, when a user initiates a development request, if input information is "AAA", determining that page paths of all pages are traversed in a first page, sequentially determining a page path of each page, determining whether the page path includes first identification information "AAA", and if the page path includes the first identification information "AAA", determining a page corresponding to the page path including the first identification information "AAA" as a page, that is, a page to be developed.
Therefore, in the process of selecting the first page by the pages to be developed, the user only needs to input the path of the page to be developed when initiating the development request, and the first page to be developed can be matched quickly.
Next, the page code corresponding to the first page needs to be stored in a subfolder corresponding to the first page in a fourth folder, where the data structure of the fourth folder is as shown in fig. 4, and the fourth folder includes a plurality of subfolders: subfolder 1, subfolder 2, subfolder 3, … …, subfolder N, each subfolder corresponding to a second identification information.
Next, a process of matching the subfolder corresponding thereto for the first page will be specifically described with reference to fig. 5. Fig. 5 is a flowchart illustrating a page identification information matching method according to an exemplary embodiment.
As shown in fig. 5, the method specifically includes the following steps:
s501, a development request for a first page in a plurality of pages to be developed is received, wherein the development request comprises first identification information corresponding to the first page.
When preparing to develop the first page, it is necessary to determine the subfolder corresponding to the first page, that is, to match an entry of a storage path for the first page, in which the page code of the first page is stored, so that the page code of the first page can be stored in the subfolder corresponding to the first page. Since the development request includes the first identification information corresponding to the first page, the first identification information can be acquired together when the development request of the first page is received.
S502, matching the first identification information with the identification information of each subfolder in the fourth folder.
Specifically, each subfolder stores page code of one page, and a target branch is usually created by a developer, so the number of subfolders in the fourth file is smaller, and is much smaller than the number of pages in the whole project, and the matching speed is also fast.
Therefore, a configuration file is not required to be respectively established for each page to configure the page entry developed this time. There is no need to import environment variables for matching entries. The workload of modifying the configuration file and the environment variables each time a new page is developed is avoided.
S503, judging whether the matching is successful.
S504, if the matching is successful, second identification information matched with the first identification information is obtained.
For example, the first identification information a of the first page and the second identification information 1 of the subfolder 1 in the fourth folder have a preset matching relationship. When the first identification information a is matched to the subfolder 1 with the second identification information in the fourth folder, the first identification information a is considered to be successfully matched with the subfolder 1.
If the match is not successful, a match is made with the next subfolder in the fourth folder.
And S505, determining the target subfolder corresponding to the second identification information as the subfolder corresponding to the first page. And storing the page code corresponding to the first page in the target subfolder.
Therefore, in the process of selecting a storage path for the first page, namely storing the page code subfolders of the first page, a user only needs to input identification information of the first page to be developed when a development request is initiated, and can be matched with the identification information of each subfolder in the first folder, so that the subfolder corresponding to the first page to be developed is quickly determined.
Illustratively, the identification information of the multiple pages to be developed is respectively: A. b, C are provided. The identification information of each subfolder in the fourth folder is respectively: D. e, F are provided. A and D have a preset matching relationship, B and E have a preset matching relationship, and C and F have a preset matching relationship. Receiving a development request for a first page A in a plurality of pages to be developed, wherein the development request comprises first identification information A corresponding to the first page A; matching the first identification information A with the identification information of each subfolder in the fourth folder to obtain second identification information D matched with the first identification information; and determining the target subfolder corresponding to the second identification information D as the subfolder D corresponding to the first page. And developing a first page in the target branch, and storing page codes corresponding to the first page A in a target subfolder D.
In some embodiments of the present disclosure, optionally, after S330, the page development method may further include the following steps:
and in the case of the target page development completion, merging the target branch into a main branch of the target project, wherein a fifth folder of the main branch is used for storing the common codes of the multiple pages and the page codes of the target page.
Each time the developed page code is submitted, the distributed version control system (Git) strings them into a timeline, and the timeline formed by multiple submissions is a branch. By the time of the last commit, this branch is called the main branch (i.e., master branch). Initially, the main branch is a line, and Git points to the latest commit with the main branch, and then points to the main branch with a pointer, the commit point of the current branch can be determined. Among them, Git is an open-source distributed version control system, and can effectively process the version management of projects from very small to very large at high speed.
And under the condition that the target page development is completed, namely the target page is submitted, merging the target branch into the main branch of the target project, and synchronously updating the page code of the target page to a fifth folder of the main branch. Here, only the page code of the target page is stored in the fourth folder of the target branch, and only the page code of the target page needs to be compiled and packaged before the target page is submitted.
For any page, when the development is completed, the page code of the page is updated to the fifth folder of the main branch, that is, the fifth folder of the main branch is used for storing the common code of the multiple pages and the page code of the target page.
It will be appreciated that the master branch is the union of all page code in the target project, for archiving, online use, etc. Wherein, because the page exists in the form of address on the server, what the online is used is the page display content that the user sees.
Here, because only the page code of the target page is stored in the fourth folder of the target branch, the page code of the target page only needs to be compiled and packaged before the target page is submitted, and the page code of the whole project does not need to be compiled and packaged, so that the time of uploading to a server is reduced, and the occupied storage space is reduced. Further reducing development time and accelerating development process.
In some embodiments of the present disclosure, optionally, in response to a submission instruction sent by a user, receiving a first common code for multiple pages of a target project; and in the case that the first common code is inconsistent with the common codes of the multiple pages stored in the first folder, replacing the common codes of the multiple pages with the first common code.
If the user submits new common code, namely new library code and/or new component code, responding to a submission instruction sent by the user, receiving first common code (new library code and/or new component code) of multiple pages of the target project, comparing whether the first common code is consistent with the common code of the multiple pages stored in the first folder, and if not, replacing the common code of the multiple pages stored in the first folder of the development branch with the first common code.
Here, the common code in the development branch can be kept updated in synchronization with the newly updated common code.
After the above steps relating to the step after receiving the first common code in response to a commit instruction sent by the user, the method may further include the steps of:
in case the first common code is not identical to the common code of the multi-page stored in the fifth folder of the main branch, the common code of the multi-page stored in the fifth folder is replaced with the first common code.
If the user submits new common code, namely new library code and/or new component code, responding to a submission instruction sent by the user, receiving first common code (new library code and/or new component code) of multiple pages of the target project, comparing whether the first common code is consistent with the common code of the multiple pages stored in the fifth folder, and if not, replacing the common code of the multiple pages stored in the fifth folder of the main branch with the first common code.
Here, it can be guaranteed that the common code in the primary branch is kept updated synchronously with the most recently updated common code.
In summary, the embodiment of the present disclosure creates a target branch in a development branch of a multi-page project, where a first folder of the development branch is used to store common codes, a second folder of the development branch is an empty folder or a folder in which example codes are stored, and accordingly, a third folder of the target branch created in the development branch is also used to store common codes, and a fourth folder of the target branch is also an empty folder or a folder in which example codes are stored. Therefore, when the target page is developed in the target branch, the page code of the whole project does not need to be downloaded, the page code of the target page only needs to be compiled and packaged before submission, and the page code of the whole project does not need to be downloaded, compiled and packaged, so that the development time is saved, and the development process is accelerated.
To facilitate an understanding of the method and steps illustrated in fig. 3 above, reference will now be made to fig. 6. FIG. 6 is a page development flow diagram illustrating another multi-page project in accordance with an illustrative embodiment. As shown in FIG. 6, the multi-page project includes a main branch 610, a development branch 620, and a target branch 630. Wherein main branch 610 includes a fifth folder 612; development branch 620 includes a first folder 622 and a second folder 624; the target branch includes a third folder 632 and a fourth folder 634.
In a specific implementation manner of the multi-page project development target page as shown in fig. 6, first, in the step related to creating the development branch of the target project, specifically, the step may be: copying one main branch 610 as a development branch 620, the present disclosure does not limit the specific way in which the second folder is emptied. In which the fifth folder 612 of main branch 610 stores the common code in the target item and the page code of all pages. Development branch 620, which results from copying main branch 610, also stores common code in the target project.
However, unlike main branch 610, the page code for all pages in the target project is not stored in development branch 620, i.e., only common code for multiple pages is retained in the folder of development branch 620. I.e., the first folder 622 of the development branch is used to store common code for multiple pages, and the second folder 624 is an empty folder.
In some embodiments of the present disclosure, second folder 624 may also store some example code (demo page code).
Then, in the step related to creating the target branch 630 from the development branch 620, specifically, the following steps may be performed: one development branch 620 is copied as a target branch 630.
The first folder 622 of the development branch 620 stores the common code in the target project. The folder of the target branch 630 obtained by the duplicate development branch 620 also stores the common code in the multi-page project. Also, the second folder 624 of the development branch 620 is empty or stores example code, so the fourth folder 634 of the target branch 630 is also empty or stores example code.
Thus, since the second folder 624 of the development branch is an empty folder, during the process of creating the target branch 630, it is not necessary to remotely download the page codes of all pages in the target project, which can save time and resources. Moreover, after the development of the target branch 630 is completed and before the target branch is ready to be submitted, the target branch only needs to compile and package the page code corresponding to the target page in the fourth folder 634, so that the compiling and packaging speed is increased, and the development process is promoted.
Based on the page development method, the disclosure also provides a page development device. This is explained with reference to fig. 7.
FIG. 7 is a block diagram illustrating a page development apparatus in accordance with an exemplary embodiment. Referring to fig. 7, the page developing apparatus 700 may include a first creating module 710, a second creating module 720, a developing module 730, and a storing module 740.
The first creating module 710 is configured to execute a development branch for creating a target project, wherein the target project is a project comprising multiple pages, folders of the development branch comprise a first folder and a second folder, the first folder is used for storing common codes of the multiple pages, and the second folder is an empty folder or a folder for storing example codes.
And the second creating module 720 is configured to execute the creation of the target branch from the development branch, wherein the folder of the target branch comprises a third folder and a fourth folder, the third folder is used for storing the common codes of the multiple pages, and the fourth folder is an empty folder or a folder in which the example codes are stored.
A development module 730 configured to execute the development of the target page in the target branch.
The storage module 740 is configured to execute storing the page code corresponding to the target page in the fourth folder.
In the embodiment of the disclosure, the page development apparatus 700 can create a target branch in a development branch of a multi-page project, and then develop a target page in the target branch, wherein a folder of the development branch is an empty folder or a folder in which example code is stored. Therefore, when the target page is developed, the page code of the whole project does not need to be downloaded, the page code of the target page only needs to be compiled and packaged before submission, and the page code of the whole project does not need to be downloaded, compiled and packaged, so that the development time is saved, and the development process is accelerated.
The related first folder comprises a first subfolder and a second subfolder, and the first subfolder is used for storing multi-page library codes; the second subfolder is for storing multi-page component code.
The related first target page comprises a plurality of pages to be developed, and the fourth folder is used for storing page codes of the pages to be developed.
In some embodiments of the present disclosure, the page developing apparatus 700 may further include a first receiving module, a matching module, and a determining module.
The first receiving module is configured to execute receiving a development request for a first page of the plurality of pages to be developed, wherein the development request comprises first identification information corresponding to the first page.
The matching module is configured to perform matching of the first identification information and the identification information of each subfolder in the fourth folder to obtain second identification information matched with the first identification information.
The determining module is configured to determine a target subfolder corresponding to the second identification information as the subfolder corresponding to the first page.
Accordingly, the development module 730 is further configured to perform developing the first page in the target branch.
Accordingly, the storage module 740 is further configured to execute storing the page code corresponding to the first page in the target subfolder.
In some embodiments of the present disclosure, the page development apparatus 700 may further include a second receiving module and a replacing module.
The second receiving module is configured to execute the first common code of the multiple pages of the target project in response to the submission instruction sent by the user.
The replacing module is configured to replace the common codes of the multiple pages with the first common codes in the case that the first common codes are inconsistent with the common codes of the multiple pages stored in the first folder.
In some embodiments of the present disclosure, the replacement module is further configured to perform replacing the common code of the multiple pages stored in the fifth folder with the first common code in case the first common code is inconsistent with the common code of the multiple pages stored in the fifth folder of the main branch.
In some embodiments of the present disclosure, the page development apparatus 700 may further include: and a merging module.
The merging module is configured to execute merging of the target branch into a main branch of the target project when the target page development is completed, wherein a fifth folder of the main branch is used for storing the common codes of the multiple pages and the page codes of the target page.
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.
FIG. 8 is a block diagram illustrating a server in accordance with an exemplary embodiment. Referring to fig. 8, an embodiment of the present disclosure further provides a server, including a processor 810, a communication interface 820, a memory 830 and a communication bus 840, where the processor 810, the communication interface 820 and the memory 830 complete communication with each other through the communication bus 840.
The memory 830 is used for storing instructions executable by the processor 810.
The processor 810, when executing the instructions stored in the memory 830, implements the following steps:
creating a development branch of a target project, wherein the target project is a project comprising multiple pages, folders of the development branch comprise a first folder and a second folder, the first folder is used for storing public codes of the multiple pages, and the second folder is an empty folder or a folder in which example codes are stored; creating a target branch from the development branch, wherein the folder of the target branch comprises a third folder and a fourth folder, the third folder is used for storing public codes of multiple pages, and the fourth folder is an empty folder or a folder for storing example codes; and developing a target page in the target branch, and storing the page code corresponding to the target page in a fourth folder.
It can be seen that, by applying the embodiment of the present disclosure, when a multi-page project is developed, a target branch is created in a development branch of the multi-page project, a first folder of the development branch is used for storing common codes, a second folder of the development branch is an empty folder or a folder in which example codes are stored, accordingly, a third folder of the target branch created in the development branch is also used for storing common codes, and a fourth folder of the target branch is also an empty folder or a folder in which example codes are stored. Therefore, when the target page is developed in the target branch, the page code of the whole project does not need to be downloaded, the page code of the target page only needs to be compiled and packaged before submission, and the page code of the whole project does not need to be downloaded, compiled and packaged, so that the development time is saved, and the development process is accelerated.
FIG. 9 is a block diagram illustrating an apparatus for data processing according to an example embodiment. For example, the device 900 may be provided as a server. Referring to fig. 9, the server 900 includes a processing component 922 that further includes one or more processors and memory resources, represented by memory 932, for storing instructions, such as applications, that are executable by the processing component 922. The application programs stored in memory 932 may include one or more modules that each correspond to a set of instructions. Further, the processing component 922 is configured to execute instructions to perform the page development method described in any of the embodiments above.
The device 900 may also include a power component 926 configured to perform power management of the device 900, a wired or wireless network interface 950 configured to connect the device 900 to a network, and an input/output (I/O) interface 958. The device 900 may operate based on an operating system stored in the memory 932, such as Windows Server, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, or the like.
In some embodiments of the present disclosure, a storage medium is further provided, and when executed by a processor of a server, the instructions in the storage medium enable the server to perform the page development method described in any one of the above embodiments.
Alternatively, the storage medium may be a non-transitory computer readable storage medium, which may be, for example, a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
In some embodiments of the present disclosure, there is further provided a computer program product, wherein instructions of the computer program product, when executed by a processor of a server, enable the server to perform the page development method according to any of the above embodiments.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (10)

1. A page development method is applied to electronic equipment and is characterized by comprising the following steps:
creating a development branch of a target project, wherein the target project is a project comprising multiple pages, folders of the development branch comprise a first folder and a second folder, the first folder is used for storing common codes of the multiple pages, and the second folder is an empty folder or a folder in which example codes are stored;
creating a target branch from the development branch, wherein the folders of the target branch comprise a third folder and a fourth folder, the third folder is used for storing the common codes of the multiple pages, and the fourth folder is an empty folder or a folder in which the example codes are stored;
and developing a target page in the target branch, and storing a page code corresponding to the target page in the fourth folder.
2. The method of claim 1, wherein the target page comprises a plurality of pages to be developed, and wherein the fourth folder is configured to store page code of the plurality of pages to be developed.
3. The method of claim 2, wherein prior to said developing a target page in the target branch, the method further comprises:
receiving a development request for a first page in the plurality of pages to be developed, wherein the development request comprises first identification information corresponding to the first page;
matching the first identification information with the identification information of each subfolder in the fourth folder to obtain second identification information matched with the first identification information;
determining a target subfolder corresponding to the second identification information as the subfolder corresponding to the first page;
the developing a target page in the target branch specifically includes:
and the first page is developed in the target branch, and page codes corresponding to the first page are stored in the target subfolder.
4. The method of claim 1, wherein after the developing the target page in the target branch, the method further comprises:
and under the condition that the target page development is completed, merging the target branch into a main branch of the target project, wherein a fifth folder of the main branch is used for storing the common codes of the multiple pages and the page codes of the target page.
5. A page development apparatus, comprising:
the system comprises a first creation module, a second creation module and a third creation module, wherein the first creation module is configured to execute a development branch for creating a target project, the target project is a project comprising multiple pages, folders of the development branch comprise a first folder and a second folder, the first folder is used for storing common codes of the multiple pages, and the second folder is an empty folder or a folder for storing example codes;
a second creating module configured to perform creating a target branch from the development branch, wherein folders of the target branch include a third folder and a fourth folder, the third folder is used for storing common codes of the multiple pages, and the fourth folder is an empty folder or a folder in which the example codes are stored;
a development module configured to execute developing a target page in the target branch;
a storage module configured to store the page code corresponding to the target page in the fourth folder.
6. The apparatus of claim 5, wherein the target page comprises a plurality of pages to be developed, and wherein the fourth folder is configured to store page codes of the plurality of pages to be developed.
7. The apparatus of claim 6, further comprising:
a first receiving module configured to execute receiving a development request for a first page of the plurality of pages to be developed, the development request including first identification information corresponding to the first page;
a matching module configured to perform matching of the first identification information with identification information of each subfolder in the fourth folder to obtain second identification information matched with the first identification information;
a determining module configured to perform determining a target subfolder corresponding to the second identification information as the subfolder corresponding to the first page;
the development module is further configured to execute the development of the first page in the target branch;
the storage module is further configured to store the page code corresponding to the first page in the target subfolder.
8. The apparatus of claim 5, further comprising:
a merging module configured to execute, in a case that the target page development is completed, merging the target branch into a main branch of the target project, where a fifth folder of the main branch is used for storing the common code of the multiple pages and the page code of the target page.
9. A server, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the page development method of any of claims 1 to 4.
10. A storage medium, wherein instructions in the storage medium, when executed by a processor of a server, enable the server to perform the page development method of any one of claims 1 to 4.
CN202010699783.2A 2020-07-20 2020-07-20 Page development method, device, server and storage medium Pending CN112000334A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010699783.2A CN112000334A (en) 2020-07-20 2020-07-20 Page development method, device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010699783.2A CN112000334A (en) 2020-07-20 2020-07-20 Page development method, device, server and storage medium

Publications (1)

Publication Number Publication Date
CN112000334A true CN112000334A (en) 2020-11-27

Family

ID=73468014

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010699783.2A Pending CN112000334A (en) 2020-07-20 2020-07-20 Page development method, device, server and storage medium

Country Status (1)

Country Link
CN (1) CN112000334A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112528199A (en) * 2020-12-11 2021-03-19 杭州搜车数据科技有限公司 Method and device for publishing activity page, electronic device and storage medium
CN113609422A (en) * 2021-08-12 2021-11-05 上海数依数据科技有限公司 Method, system, processor and readable storage medium for visualizing a configuration page

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105094851A (en) * 2015-09-06 2015-11-25 浪潮软件股份有限公司 Method for momentarily issuing codes based on Git
CN107291448A (en) * 2017-05-19 2017-10-24 上海瀚乾信息技术服务有限公司 A kind of Software Develop Project Management system
CN108415694A (en) * 2018-02-28 2018-08-17 山东汇贸电子口岸有限公司 A kind of Android agile development system and methods based on GitFlow workflows
CN109933364A (en) * 2019-02-25 2019-06-25 晶晨半导体(上海)股份有限公司 A kind of code administration method
CN110413309A (en) * 2019-08-02 2019-11-05 浪潮云信息技术有限公司 A kind of item code branch management method and system based on gitlab
CN111142879A (en) * 2019-12-05 2020-05-12 深圳融卡智能科技有限公司 Software integration release method and automatic operation and maintenance platform
CN111367501A (en) * 2020-02-13 2020-07-03 深圳壹账通智能科技有限公司 Software online development method, device, equipment and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105094851A (en) * 2015-09-06 2015-11-25 浪潮软件股份有限公司 Method for momentarily issuing codes based on Git
CN107291448A (en) * 2017-05-19 2017-10-24 上海瀚乾信息技术服务有限公司 A kind of Software Develop Project Management system
CN108415694A (en) * 2018-02-28 2018-08-17 山东汇贸电子口岸有限公司 A kind of Android agile development system and methods based on GitFlow workflows
CN109933364A (en) * 2019-02-25 2019-06-25 晶晨半导体(上海)股份有限公司 A kind of code administration method
CN110413309A (en) * 2019-08-02 2019-11-05 浪潮云信息技术有限公司 A kind of item code branch management method and system based on gitlab
CN111142879A (en) * 2019-12-05 2020-05-12 深圳融卡智能科技有限公司 Software integration release method and automatic operation and maintenance platform
CN111367501A (en) * 2020-02-13 2020-07-03 深圳壹账通智能科技有限公司 Software online development method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨永毅;赵芳;赵思亮;: "基于SVN技术实现气象项目源代码管理", 气象水文海洋仪器, no. 04 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112528199A (en) * 2020-12-11 2021-03-19 杭州搜车数据科技有限公司 Method and device for publishing activity page, electronic device and storage medium
CN112528199B (en) * 2020-12-11 2022-09-09 杭州搜车数据科技有限公司 Method and device for publishing activity page, electronic device and storage medium
CN113609422A (en) * 2021-08-12 2021-11-05 上海数依数据科技有限公司 Method, system, processor and readable storage medium for visualizing a configuration page

Similar Documents

Publication Publication Date Title
CN110928529B (en) Method and system for assisting operator development
US9965259B2 (en) System for translating diverse programming languages
US20140157243A1 (en) System for Translating Diverse Programming Languages
CN109739523B (en) Application program packaging method and device, storage medium and terminal
CN104731589A (en) Automatic generation method and device of user interface (UI)
US20200387372A1 (en) Microservice file generation system
US20140298318A1 (en) Computer-executable application packaging method, computer-executable device and storage media performing the same
CN110502212B (en) Multi-language-oriented high concurrency online development supporting method
CN111026439B (en) Application program compatibility method, device, equipment and computer storage medium
CN109634591B (en) File processing method and device
CN110389755B (en) Code processing method and device, electronic equipment and computer readable storage medium
CN108549537A (en) The method and system of user data acquisition based on Android terminal
CN111176717A (en) Method and device for generating installation package and electronic equipment
CN112000334A (en) Page development method, device, server and storage medium
US7966600B2 (en) Distributed resource understanding tool management
CN115268879A (en) Code processing method and device, electronic equipment and storage medium
CN107608672B (en) UI module manager, UI module management method and system
CN116301951B (en) Micro-service application installation upgrading method and device based on kubernetes
CN110018831B (en) Program processing method, program processing apparatus, and computer-readable storage medium
CN112631563A (en) System development method and device based on framework, computer equipment and storage medium
CN112068879A (en) Method and device for constructing client application development framework based on configuration
CN110362317B (en) Code conversion method, device and storage medium
CN116432624A (en) Micro-service API document generation method, device, equipment and storage medium
CN111176912A (en) Relay protection device hardware configuration information management system and method
KR102397494B1 (en) Low code web development and operating system, and service method using of it

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