CN110502232B - Routing address configuration method and device for page application - Google Patents

Routing address configuration method and device for page application Download PDF

Info

Publication number
CN110502232B
CN110502232B CN201810468536.4A CN201810468536A CN110502232B CN 110502232 B CN110502232 B CN 110502232B CN 201810468536 A CN201810468536 A CN 201810468536A CN 110502232 B CN110502232 B CN 110502232B
Authority
CN
China
Prior art keywords
component
folder
component files
routing address
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.)
Active
Application number
CN201810468536.4A
Other languages
Chinese (zh)
Other versions
CN110502232A (en
Inventor
王静
李世红
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision System Technology Co Ltd
Original Assignee
Hangzhou Hikvision System 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 Hangzhou Hikvision System Technology Co Ltd filed Critical Hangzhou Hikvision System Technology Co Ltd
Priority to CN201810468536.4A priority Critical patent/CN110502232B/en
Publication of CN110502232A publication Critical patent/CN110502232A/en
Application granted granted Critical
Publication of CN110502232B publication Critical patent/CN110502232B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a routing address configuration method and a configuration device for page application, wherein the method comprises the following steps: monitoring a directory folder storing component files corresponding to each display page of the page application; when the number and/or names of the component files in the directory folder are monitored to change, acquiring storage paths and names of the component files in the folder; generating a routing address file of the page application, wherein the routing address file comprises: names and storage paths of the component files in the directory folder. The routing address configuration method and the routing address configuration device for the page application provided by the embodiment of the invention can automatically regenerate the routing address file containing the file names and the storage paths of all the components, and reduce the development workload of the page application.

Description

Routing address configuration method and device for page application
Technical Field
The invention relates to the technical field of page-based application software development, in particular to a routing address configuration method and device for page application.
Background
Currently, the Vue framework is commonly employed for the development of web page applications. The Vue framework is a set of progressive frameworks that are used to build user interfaces. In applications developed based on the Vue framework, its display pages are developed based on components, i.e., one display page for each component file. By calling the stored different component files, different display pages are displayed in the web page.
How to make a component file and its corresponding display page build a mapping relation, which needs to be implemented by a routing address. The routing address of a component file generally comprises two parts, namely a path and a component, wherein the path represents a path, namely a storage path of the component file; component means the name of the component, i.e., the component file. When the server generates the display page, the server can find out the corresponding component file according to the routing address corresponding to the display page, so as to render the display page by using the found component file.
Currently, a page application is developed based on a Vue framework, when the routing address of each component file is configured, a public page needs to be created, and a developer manually adds the storage path and the name of each component file to the public page as the routing address to generate the routing address file of the page application. However, in the application development process, multiple people often cooperatively develop different display pages, and each time a display page is added, deleted or modified, the routing address of the component file corresponding to the modified display page needs to be manually reconfigured, so that the development workload of the application is increased.
Disclosure of Invention
The embodiment of the invention aims to provide a routing address configuration method and a routing address configuration device for page application, so as to reduce the development workload of the page application. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for configuring a routing address of a page application, including:
monitoring a directory folder storing component files corresponding to each display page of the page application;
when the number and/or names of the component files in the directory folder are monitored to be changed, acquiring storage paths and names of the component files in the folder;
generating a routing address file of the page application, wherein the routing address file comprises: and names and storage paths of the component files in the directory folder.
Optionally, the monitoring the directory folder storing the component files corresponding to each display page of the page application includes:
judging whether the traversal starting condition is met;
when the traversing starting condition is met, traversing the directory folder storing the component files corresponding to each display page of the page application, and obtaining each component file except the sub-component files in the sub-component folder in the directory folder;
recording the obtained component files except the component files in the sub-component folder as target component files of the current traversal;
and comparing the target component files recorded at the present time with the target component files recorded in the last traversal, and determining whether the number and the names of the component files in the directory folder are changed or not.
Optionally said determining whether the traversal start condition is met includes: judging whether a preset time period is reached;
or, judging whether a traversing instruction is received.
Optionally, the directory folder storing the component files corresponding to each display page of the page application is: and the pages are applied to the views folder.
Optionally, the monitoring the directory folder storing the component files corresponding to each display page of the page application includes:
and monitoring the directory folder storing the component files corresponding to each display page of the page application by calling the watch dependent package management module.
Optionally, the generating the routing address file of the page application includes:
and writing names and storage paths corresponding to the component files in the folder into blank routing address files with json format, and generating the routing address files of the page application.
In a second aspect, an embodiment of the present invention provides a routing address configuration apparatus for a page application, including:
the monitoring module is used for monitoring the directory folder storing the component files corresponding to each display page of the page application;
the acquisition module is used for acquiring the storage path and the name of each component file in the folder when the number and/or the name of the component files in the directory folder are monitored to change;
the generation module is used for generating a routing address file of the page application, and the routing address file comprises: and names and storage paths of the component files in the directory folder.
Optionally, the monitoring module includes:
the judging submodule is used for judging whether the traversal starting condition is met or not;
the traversal submodule is used for traversing the directory folder storing the component files corresponding to each display page of the page application when the traversal starting condition is met, and acquiring each component file except the sub-component files in the sub-component folder in the directory folder;
the recording sub-module is used for recording the obtained component files except the component files in the sub-component folder as the target component files of the current traversal;
and the determining submodule is used for comparing the target component file recorded at the time with the target component file recorded in the last traversal, and determining whether the number and the name of the component files in the directory folder are changed or not.
Optionally, the judging submodule is specifically configured to:
judging whether a preset time period is reached;
or, judging whether a traversing instruction is received.
Optionally, the directory folder storing the component files corresponding to each display page of the page application is: and the pages are applied to the views folder.
Optionally, the monitoring module is specifically configured to:
and monitoring the directory folder storing the component files corresponding to each display page of the page application by calling the watch dependent package management module.
Optionally, the generating module is specifically configured to:
and writing names and storage paths corresponding to the component files in the folder into blank routing address files with json format, and generating the routing address files of the page application.
In a third aspect, embodiments of the present invention provide a server comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: method steps of a routing address configuration method for realizing the page application provided by the first aspect of the embodiment of the invention are realized.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium, where a computer program is stored, where the computer program is executed by a processor to perform method steps of the routing address configuration method for a page application provided in the first aspect of the embodiment of the present invention.
In the method for configuring the routing address of the page application, in the process of developing the web page application by adopting the Vue framework, the names and the numbers of the component files corresponding to the display pages of the page application are monitored aiming at the directory folder storing the component files under the directory folder, and when the numbers and/or the names of the component files are changed, the routing address file containing the names and the storage paths of the component files can be automatically regenerated, so that when a developer modifies the display pages in the page application, the routing address of the component file corresponding to the modified display page does not need to be manually configured, and the development workload of the page application is reduced. Of course, it is not necessary for any one product or method of practicing the invention to achieve all of the advantages set forth above at the same time.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a routing address configuration method for a page application according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating a directory structure in a directory folder according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a specific flow of S101 in an embodiment of the invention;
FIG. 4 is a schematic diagram of another embodiment of S101 in the present invention;
FIG. 5 is a schematic diagram of recording content in a routing address file according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a routing address configuration device for a page application according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a monitoring module in a routing address configuration device of a page application according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In order to solve the problem that in the prior art, in the development process of web page application by adopting a Vue framework, the development workload of the application is increased by manually configuring a routing address. The embodiment of the invention provides a routing address configuration method of a page application, which aims at a directory folder storing component files corresponding to each display page of the page application, can monitor the names and the quantity of each component file under the directory folder, can acquire the storage path and the names of each component file in the folder when the quantity and/or the names of the component files change, and automatically regenerates a routing address file containing the names and the storage path of each component file, thereby avoiding the need of manually reconfiguring the routing address of the component file corresponding to the modified display page when a developer modifies the display page in the page application, and reducing the development workload of the page application.
As shown in fig. 1, an embodiment of the present invention provides a method for configuring a routing address of a page application, which is applied to a server, and the process may include the following steps:
s101, monitoring a directory folder storing component files corresponding to each display page of the page application.
The embodiment of the invention is used for the development environment of the front-end page application, the developed page application can be operated in a server built based on node. Js, and the page application is developed based on a Vue framework. The node. Js is an operation platform based on a Chrome V8 engine (a high-performance JavaScript engine developed by Google corporation), and the page application can be operated under the platform.
When developing a page application by a developer, a page application typically includes a plurality of display pages, and these display pages are often cooperatively developed by a plurality of developers. The component files corresponding to the display pages can be generally stored under a directory folder in a unified manner, and different research and development personnel can realize the new addition, modification or deletion of the display pages in the page application by adding, replacing or deleting the corresponding component files under the directory folder.
When a developer modifies a component file under the directory folder, the number or name of the component files under the directory folder may change. For example, when a developer adds a component file under the directory folder, the number of component files under the directory folder increases; when a developer replaces a certain component file under the directory folder with another component file, the name of the certain component file under the directory folder is changed; when a developer deletes a certain component file under the directory folder, the number of component files under the directory folder is reduced.
Thus, the directory folder may be monitored, and in particular, the names and numbers of all component files under the directory folder may be monitored.
S102, when the number and/or names of the component files in the directory folder are monitored to be changed, the storage paths and the names of the component files in the folder are acquired.
Since different developers can add, replace or delete corresponding component files under a directory folder, the number and names of component files under the directory folder may vary. Specifically, when the server monitors that the number and the names of the component files in the directory folder are changed, or when the server monitors that the number of the component files in the directory folder is changed, or when the server monitors that the names of the component files in the directory folder are changed, the server can acquire the storage paths and the names of the component files in the folder.
S103, generating a routing address file of the page application, wherein the routing address file comprises: names and storage paths of the component files in the directory folder.
In the embodiment of the invention, after the storage path and the name of each component file in the folder are acquired, the server can generate a routing address file, and the routing address file is stored in the directory folder of the page application, so that the configuration of the routing address of the page application is completed.
According to the embodiment of the invention, aiming at the directory folder storing the component files corresponding to each display page of the page application, the names and the number of the component files under the directory folder can be monitored, and when the number and/or the names of the component files are changed, the routing address files containing the names and the storage paths of the component files can be automatically regenerated, so that when a developer modifies the display page in the page application, the routing address of the component file corresponding to the modified display page does not need to be manually configured, and the development workload of the page application is reduced.
As an optional implementation manner of the embodiment of the present invention, the directory folder storing the component files corresponding to each display page of the page application may be a views folder, and the routing address is configured by monitoring the names and the number of all the component files under the views folder. In fig. 2, the view folder may include a plurality of folders, and each folder stores component files for generating a display page, for example, a monitor folder under the view folder stores form, tree, user, and queue component files.
As an optional implementation manner of the embodiment of the present invention, as shown in fig. 3, the embodiment of the present invention may monitor, by traversing files under the views folder, the directory folder storing component files corresponding to each display page of the page application, where the specific steps are as follows:
s1011, judging whether the traversal start condition is satisfied.
Before traversing the directory folder storing the component files corresponding to each display page of the page application, it may be determined whether a traversal start condition is satisfied, thereby determining whether to execute a traversal operation.
As an optional implementation manner of the embodiment of the present invention, whether the traversal start condition is satisfied may be determined by determining whether a preset time period is reached, and when the preset time period is reached, the traversal operation is performed.
As another alternative implementation manner of the embodiment of the present invention, whether the traversal start condition is satisfied may be determined by judging whether a traversal instruction is received, and when the traversal instruction is received, the traversal operation is performed.
After the research personnel complete the modification of the component files in the directory folder, the traverse instruction can be manually sent, the server receives the traverse instruction and executes the traverse operation, and the method is suitable for the condition of more modification of the component files, so that the server does not need to periodically execute the traverse operation, only needs to execute the traverse operation according to the traverse instruction, and reduces the calculation pressure of the server.
Of course, the server may also receive traversal instructions from the developer at the same time during the periodic traversal. For example, if the preset period is set to 600S, the server may traverse the component files in the directory folder once every 600S, and if the server receives the traverse instruction sent by the developer in a certain 600S period, the server may also traverse the component files in the directory folder, and continue to automatically execute the traverse operation in the next 600S.
And S1012, when the traversing starting condition is met, traversing the directory folder storing the component files corresponding to each display page of the page application, and obtaining each component file except the sub-component files in the sub-component folder in the directory folder.
When monitoring the directory files, each component file in the directory folder can be obtained by traversing the directory folder. In the directory folder, there may be folders named components under which sub-component files for displaying buttons, navigation bars, etc. in a certain display page are generally stored, and when these sub-component files change, the route address information of the display page is not affected. Thus, the server may obtain only the individual component files except for the sub-component files in the sub-component folder during the traversal of the directory folder.
In the embodiment of the invention, a preset period can be set, and the server can traverse the component files in the directory folder once every preset period. For example, if the preset period is set to be 100S, the server may traverse the component files in the directory folder once every 100S, and compare the number and names of the component files in the directory folder after the traversing operation, and if the number and names of the component files in the directory folder change relative to the number and names of the component files in the directory folder after the previous traversing operation of the traversing operation; if the preset period is 600S, the server can traverse the component files in the directory folder every 600S; if the preset period is 1800S, the server may traverse the component files in the directory folder every 1800S. The preset period is generally set according to the development difficulty of the page application, and the higher the development difficulty is, the longer the modification time of each display page is, so that if the development difficulty is high, the preset period can be increased, and if the development difficulty is low, the preset period can be reduced.
By periodically traversing the component files in the directory folder, the server can automatically monitor the change condition of the component files in the directory folder, and the intelligent degree of the component files in the directory folder during monitoring is improved.
And S1013, recording the obtained component files except the component files in the sub-component folder as the target component files of the current traversal.
For component files that result from the traversal, they may be recorded as target component files. The target component file may refer to a component file for which a routing address is to be generated.
S1014, comparing the current recorded target component file with the last traversed recorded target component file to determine whether the number and names of the component files in the directory folder are changed.
In the embodiment of the invention, the target component file recorded in the current time can be compared with the target component file recorded in the previous period, so as to determine whether the number and the names of the component files obtained in the current period change relative to the number and the names of the component files obtained in the previous traversal.
The Watch-dependent package is a package management module installed along with node. Js, and can be used for monitoring file directories, and as an alternative implementation manner of the embodiment of the invention, the directory folders of component files corresponding to each display page storing the page application can be automatically monitored by calling the Watch-dependent package management module and inputting the folder directories to be monitored into the Watch-dependent package management module. Of course, monitoring of the directory folder can be realized by other plug-ins, so long as the number and name of the component files in the directory folder can be monitored.
As an optional implementation manner of the embodiment of the present invention, as shown in FIG. 4, the process of monitoring the directory folder storing the component files corresponding to each display page of the page application may specifically include:
s201, judging whether a traversal starting condition is met; s202, if the traversal start condition is not met, not executing traversal operation; s203, if the traversing starting condition is met, traversing the directory folder storing the component files corresponding to each display page of the page application; s204, judging whether the directory folder contains a sub-component folder or not; s205, if the sub-component folder is contained, acquiring all the component files except the sub-component files in the sub-component folder in the directory folder; s206, if the sub-component folder is not included, each component file in the directory folder is directly acquired; s207, recording the obtained component files except the component files in the sub-component folder as target component files of the current traversal; s208, comparing the current recorded target component files with the last traversed recorded target component files to determine whether the number and names of the component files in the directory folder are changed.
In the embodiment of the invention, whether the sub-component folder is contained in the directory folder is judged, so that the sub-component folder can be filtered when the sub-component folder exists, namely, the sub-component file in the folder is not acquired, and the intelligent degree of monitoring the directory folder is improved.
Referring to fig. 1, as an alternative embodiment, the file format of the routing address file may be json format, and the server may write the names and storage paths corresponding to the component files in the folder into a blank routing address file with json format, so as to generate the routing address file. As shown in fig. 5, two attributes of each component file, namely, a path attribute and a component attribute, are recorded in the routing address, the path attribute corresponds to a storage path of the component file, and the component attribute corresponds to a name of the component file.
After generating the routing address file, the server can read the routing address file, and when the inter-page skip is required, the components are switched according to the storage paths of the components in the routing address file, so that the inter-page skip is realized. This process is a method often adopted in the current page application development, and will not be described here again.
In the method for configuring the routing address of the page application, in the process of developing the web page application by adopting the Vue framework, the names and the numbers of the component files corresponding to the display pages of the page application are monitored aiming at the directory folder storing the component files under the directory folder, and when the numbers and/or the names of the component files are changed, the routing address file containing the names and the storage paths of the component files can be automatically regenerated, so that when a developer modifies the display pages in the page application, the routing address of the component file corresponding to the modified display page does not need to be manually configured, and the development workload of the page application is reduced.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a routing address configuration device for a page application according to an embodiment of the present invention, where the routing address configuration device corresponds to a flow shown in fig. 1, and the routing address configuration device includes:
the monitoring module 301 is configured to monitor a directory folder storing component files corresponding to each display page of the page application.
And the acquiring module 302 is configured to acquire the storage path and the name of each component file in the folder when the number and/or the name of the component files in the directory folder are monitored to change.
The generating module 303 is configured to generate a routing address file of the page application, where the routing address file includes: names and storage paths of the component files in the directory folder.
The directory folder storing the component files corresponding to each display page of the page application is as follows: and a view folder for the page application.
The monitoring module 301 is specifically configured to:
and monitoring the directory folder storing the component files corresponding to each display page of the page application by calling a watch monitoring dependence package management module.
The generating module 303 is specifically configured to:
and writing names and storage paths corresponding to the component files in the folder into blank routing address files with json format to generate routing address files of the page application.
As shown in fig. 7, the monitoring module 301 may include:
a judgment sub-module 3011 for judging whether the traversal start condition is satisfied.
And the traversing submodule 3012 is used for traversing the directory folder storing the component files corresponding to each display page of the page application when the traversing starting condition is met, and acquiring each component file except the sub-component files in the sub-component folder in the directory folder.
And the recording submodule 3013 is used for recording the obtained component files except the component files in the sub-component folder as the target component files of the current traversal.
A determining submodule 3014 is configured to compare the target component file recorded in this time with the target component file recorded in the last traversal, and determine whether the number and the name of the component files in the directory folder change.
The judging sub-module 3011 is specifically configured to judge whether a preset time period is reached;
or, judging whether a traversing instruction is received.
In the route address configuration device for the page application provided by the embodiment of the invention, in the development process of the web page application by adopting the Vue framework, aiming at the directory folder storing the component files corresponding to each display page of the page application, the monitoring module can monitor the names and the number of the component files under the directory folder, and when the number and/or the names of the component files change, the generating module can automatically regenerate the route address file containing the names and the storage paths of the component files, so that when a developer modifies the display page in the page application, the route address of the component file corresponding to the modified display page does not need to be manually configured, and the development workload of the page application is reduced.
The present invention also provides a server, as shown in fig. 8, the server 400 includes a processor 401 and a machine-readable storage medium 402, the machine-readable storage medium storing machine-executable instructions capable of being executed by the processor, the processor being caused by the machine-executable instructions to implement the steps of:
monitoring a directory folder storing component files corresponding to each display page of the page application;
when the number and/or names of the component files in the directory folder are monitored to change, acquiring storage paths and names of the component files in the folder;
generating a routing address file of the page application, wherein the routing address file comprises: names and storage paths of the component files in the directory folder.
In the development process of web page application by adopting the Vue framework, the server provided by the embodiment of the invention can monitor the names and the number of the component files under the directory folder aiming at the directory folder of the component files corresponding to each display page of the page application, and can automatically regenerate the routing address file containing the names and the storage paths of the component files when the number and/or the names of the component files are changed, so that when a developer modifies the display page in the page application, the routing address of the component file corresponding to the modified display page does not need to be manually configured, and the development workload of the page application is reduced.
The processors mentioned by the server may be general-purpose processors, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
The embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program for executing the following steps:
monitoring a directory folder storing component files corresponding to each display page of the page application;
when the number and/or names of the component files in the directory folder are monitored to change, acquiring storage paths and names of the component files in the folder;
generating a routing address file of the page application, wherein the routing address file comprises: names and storage paths of the component files in the directory folder.
In the development process of web page application by adopting the Vue framework, the computer readable storage medium provided by the embodiment of the invention can monitor the names and the number of the component files under the directory folder aiming at the directory folder of the component files corresponding to each display page of the page application, and can automatically regenerate the routing address file containing the names and the storage paths of the component files when the number and/or the names of the component files change, thereby reducing the development workload of the page application without manually configuring the routing address of the component file corresponding to the modified display page when the display page in the page application is modified by a researcher.
For the apparatus/server/storage medium embodiments, the description is relatively simple, as it is substantially similar to the method embodiments, with reference to the description of the method embodiments in part.
It should be noted that, the device, the server and the storage medium in the embodiments of the present invention are the device, the server and the storage medium applying the routing address configuration method of the page application, respectively, so all embodiments of the routing address configuration method of the page application are applicable to the device, the server and the storage medium, and the same or similar beneficial effects can be achieved.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for system embodiments, since they are substantially similar to method embodiments, the description is relatively simple, as relevant to see a section of the description of method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (10)

1. A method for configuring a routing address of a page application, the method comprising:
monitoring a directory folder storing component files corresponding to each display page of the page application;
when the number and/or names of the component files in the directory folder are monitored to be changed, acquiring storage paths and names of the component files in the folder;
generating a routing address file of the page application, wherein the routing address file comprises: names and storage paths of the component files in the directory folder;
the monitoring of the directory folder storing the component files corresponding to each display page of the page application comprises the following steps:
judging whether the traversal starting condition is met;
when the traversing starting condition is met, traversing the directory folder storing the component files corresponding to each display page of the page application, and obtaining each component file except the sub-component files in the sub-component folder in the directory folder; when the subcomponent files in the subcomponent folder are changed, the route address information of the display page is unchanged;
recording the obtained component files except the component files in the sub-component folder as target component files of the current traversal;
and comparing the target component files recorded at the present time with the target component files recorded in the last traversal, and determining whether the number and the names of the component files in the directory folder are changed or not.
2. The routing address configuration method of page application according to claim 1, wherein the determining whether the traversal start condition is satisfied comprises: judging whether a preset time period is reached;
or, judging whether a traversing instruction is received.
3. The method for configuring routing addresses of page applications according to claim 1, wherein the directory folder storing component files corresponding to each display page of the page applications is: and the pages are applied to the views folder.
4. A method for configuring a routing address of a page application according to any one of claims 1 to 3, wherein the monitoring the directory folder storing component files corresponding to each display page of the page application includes:
and monitoring the directory folder storing the component files corresponding to each display page of the page application by calling the watch dependent package management module.
5. The method for configuring a routing address of a page application according to claim 1, wherein the generating the routing address file of the page application includes:
and writing names and storage paths corresponding to the component files in the folder into blank routing address files with json format, and generating the routing address files of the page application.
6. A routing address configuration apparatus for a page application, the apparatus comprising:
the monitoring module is used for monitoring the directory folder storing the component files corresponding to each display page of the page application;
the acquisition module is used for acquiring the storage path and the name of each component file in the folder when the number and/or the name of the component files in the directory folder are monitored to change;
the generation module is used for generating a routing address file of the page application, and the routing address file comprises: names and storage paths of the component files in the directory folder;
the monitoring module comprises:
the judging submodule is used for judging whether the traversal starting condition is met or not;
the traversal submodule is used for traversing the directory folder storing the component files corresponding to each display page of the page application when the traversal starting condition is met, and acquiring each component file except the sub-component files in the sub-component folder in the directory folder; when the subcomponent files in the subcomponent folder are changed, the route address information of the display page is unchanged;
the recording sub-module is used for recording the obtained component files except the component files in the sub-component folder as the target component files of the current traversal;
and the determining submodule is used for comparing the target component file recorded at the time with the target component file recorded in the last traversal, and determining whether the number and the name of the component files in the directory folder are changed or not.
7. The routing address configuration device for a page application according to claim 6, wherein the judging submodule is specifically configured to:
judging whether a preset time period is reached;
or, judging whether a traversing instruction is received.
8. The routing address configuration device of claim 6, wherein the directory folder storing component files corresponding to each display page of the page application is: and the pages are applied to the views folder.
9. The routing address configuration device for a page application according to any of claims 6-8, wherein the monitoring module is specifically configured to:
and monitoring the directory folder storing the component files corresponding to each display page of the page application by calling the watch dependent package management module.
10. The routing address configuration device of claim 6, wherein the generating module is specifically configured to:
and writing names and storage paths corresponding to the component files in the folder into blank routing address files with json format, and generating the routing address files of the page application.
CN201810468536.4A 2018-05-16 2018-05-16 Routing address configuration method and device for page application Active CN110502232B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810468536.4A CN110502232B (en) 2018-05-16 2018-05-16 Routing address configuration method and device for page application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810468536.4A CN110502232B (en) 2018-05-16 2018-05-16 Routing address configuration method and device for page application

Publications (2)

Publication Number Publication Date
CN110502232A CN110502232A (en) 2019-11-26
CN110502232B true CN110502232B (en) 2023-10-10

Family

ID=68583704

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810468536.4A Active CN110502232B (en) 2018-05-16 2018-05-16 Routing address configuration method and device for page application

Country Status (1)

Country Link
CN (1) CN110502232B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110968317B (en) * 2019-12-02 2023-04-18 广州鲁邦通物联网科技股份有限公司 Method and system for automatically generating vue page assembly through UCI/USI configuration file
CN111857809A (en) * 2020-07-30 2020-10-30 上海妙一生物科技有限公司 Front-end development file updating method and device and electronic equipment
CN113568605B (en) * 2021-07-02 2024-02-09 上海淇玥信息技术有限公司 Method, device and system for configuring defined route
CN117112021B (en) * 2023-10-24 2024-01-26 腾讯科技(深圳)有限公司 Route configuration generation method, device, equipment and computer readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998036367A1 (en) * 1997-02-13 1998-08-20 Siemens Aktiengesellschaft Method for generating a group of page files formatted in a page markup language
CN106155742A (en) * 2016-06-30 2016-11-23 百度在线网络技术(北京)有限公司 Assembly updates processing method and processing device
CN106446112A (en) * 2016-09-14 2017-02-22 北京小米移动软件有限公司 Page display method and device
CN106843899A (en) * 2017-02-09 2017-06-13 腾讯科技(深圳)有限公司 A kind of web development methods and device based on Node.js platforms
CN107729531A (en) * 2017-10-27 2018-02-23 深圳市行云易通科技有限公司 A kind of dynamic renders class front page optimization method
CN107800562A (en) * 2017-02-16 2018-03-13 平安科技(深圳)有限公司 The method for configuring route and device of a kind of view file
CN107809383A (en) * 2016-09-08 2018-03-16 腾讯科技(深圳)有限公司 A kind of map paths method and device based on MVC

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8418131B2 (en) * 1998-11-25 2013-04-09 Helmut Emmelmann Interactive server side components
US6950916B2 (en) * 2001-01-31 2005-09-27 Rto Software, Inc. Dynamically setting the optimal base addresses of process components
US7209934B2 (en) * 2003-11-21 2007-04-24 Bellsouth Intellectual Property Corporation Methods, systems and computer program products for monitoring files

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998036367A1 (en) * 1997-02-13 1998-08-20 Siemens Aktiengesellschaft Method for generating a group of page files formatted in a page markup language
CN106155742A (en) * 2016-06-30 2016-11-23 百度在线网络技术(北京)有限公司 Assembly updates processing method and processing device
CN107809383A (en) * 2016-09-08 2018-03-16 腾讯科技(深圳)有限公司 A kind of map paths method and device based on MVC
CN106446112A (en) * 2016-09-14 2017-02-22 北京小米移动软件有限公司 Page display method and device
CN106843899A (en) * 2017-02-09 2017-06-13 腾讯科技(深圳)有限公司 A kind of web development methods and device based on Node.js platforms
CN107800562A (en) * 2017-02-16 2018-03-13 平安科技(深圳)有限公司 The method for configuring route and device of a kind of view file
CN107729531A (en) * 2017-10-27 2018-02-23 深圳市行云易通科技有限公司 A kind of dynamic renders class front page optimization method

Also Published As

Publication number Publication date
CN110502232A (en) 2019-11-26

Similar Documents

Publication Publication Date Title
CN110502232B (en) Routing address configuration method and device for page application
CN105556545B (en) Apparatus, system and method for crowdsourcing domain specific intelligence
WO2016192604A1 (en) Visualization method, device and system for global task node dependence relationship
US10585760B2 (en) File name level based file search and restoration from block level backups of virtual machines
US20110022571A1 (en) Method of managing website components of a browser
US20190391739A1 (en) Expiration handling for block level backup of virtual machines
US10614087B2 (en) Data analytics on distributed databases
WO2009105179A1 (en) Methods, systems, and computer program products for updating software on a data processing system based on transition rules between classes of compatible versions
CN111818175B (en) Enterprise service bus configuration file generation method, device, equipment and storage medium
CN110427258A (en) Scheduling of resource control method and device based on cloud platform
US11016934B2 (en) Automated content-based and context-based file organizational structuring
JP4795446B2 (en) Operation verification apparatus and operation verification program
CN102902770A (en) Method and system for assembling mirror image files
JP4681673B1 (en) Operation verification apparatus, operation verification method, and operation verification program
CN112231531A (en) Data display method, equipment and medium based on openstb
JP4846029B2 (en) Operation verification apparatus, operation verification method, and operation verification program
CN109582347B (en) Method and device for acquiring front-end codes
CN110019497B (en) Data reading method and device
JP2017524211A (en) Method for unifying information and tools from a plurality of information sources, and computer program product and apparatus applying said method
US10558640B2 (en) Dynamically adding custom data definition language syntax to a database management system
JP5761200B2 (en) Information processing device
US8990499B2 (en) Caching of a site model in a hierarchical modeling system for network sites
CN113961298A (en) Page switching method, device, equipment and medium
US9420052B2 (en) Web navigation using web navigation pattern histories
CN105069108A (en) Method and device for massive data query based on PaaS (Platform as a Service) system

Legal Events

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