CN105320662B - Webpage generating method and device - Google Patents

Webpage generating method and device Download PDF

Info

Publication number
CN105320662B
CN105320662B CN201410256418.9A CN201410256418A CN105320662B CN 105320662 B CN105320662 B CN 105320662B CN 201410256418 A CN201410256418 A CN 201410256418A CN 105320662 B CN105320662 B CN 105320662B
Authority
CN
China
Prior art keywords
webpage
layer
variable
component part
view
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
CN201410256418.9A
Other languages
Chinese (zh)
Other versions
CN105320662A (en
Inventor
闫小坤
郝翔
曹涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Beijing Co Ltd
Original Assignee
Tencent Technology Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Beijing Co Ltd filed Critical Tencent Technology Beijing Co Ltd
Priority to CN201410256418.9A priority Critical patent/CN105320662B/en
Publication of CN105320662A publication Critical patent/CN105320662A/en
Application granted granted Critical
Publication of CN105320662B publication Critical patent/CN105320662B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a kind of webpage generating method and devices, belong to field of computer technology.The described method includes: obtaining web data by view layer;The web data is sent to layout layer by the view layer;The content that the web data is replaced to corresponding webpage component part in topology file by the layout layer, obtains webpage, and the topology file is used to determine each webpage component part of the webpage.Described device includes: data acquisition module, data transmission blocks and auto-building html files module.The present invention solves the problems, such as that server quotes auto-building html files low efficiency caused by more multiple common template file generated webpage, has achieved the effect that improve auto-building html files efficiency.

Description

Webpage generating method and device
Technical field
The present invention relates to field of computer technology, in particular to a kind of webpage generating method and device.
Background technique
Terminal can send webpage acquisition request to server, server is according to the net when obtaining webpage to server Page acquisition request obtains web data, generates webpage according to web data, webpage is sent to terminal, the net that end-on receives Page is shown.
Webpage would generally include head, sidebar and bottom, and therefore, developer can edit head template file, sidebar The common template file of template file and bottom template file etc.When generating webpage according to web data, server is successively The common template file for calling editor, web data is respectively added in corresponding common template file, webpage is obtained.
In the implementation of the present invention, discovery at least has the following deficiencies: inventor in the prior art
Due to requiring to handle multiple common template files when server generates each webpage, so that server is to file It is more to quote number, causes code redundancy, causes the efficiency of auto-building html files lower.
Summary of the invention
In order to which settlement server quotes auto-building html files low efficiency caused by more multiple common template file generated webpage Problem, the embodiment of the invention provides a kind of webpage generating method and devices.The technical solution is as follows:
In a first aspect, the embodiment of the invention provides a kind of webpage generating methods, which comprises
Web data is obtained by view layer;
The web data is sent to layout layer by the view layer;
The content that the web data is replaced to corresponding webpage component part in topology file by the layout layer, obtains To webpage, the topology file is used to determine each webpage component part of the webpage.
Second aspect, the embodiment of the invention provides a kind of auto-building html files device, described device includes:
Data acquisition module, for obtaining web data by view layer;
Data transmission blocks, the web data for being got the data acquisition module by the view layer It is sent to layout layer;
Auto-building html files module, for the web data to be replaced corresponding webpage in topology file by the layout layer The content of component part, obtains webpage, and the topology file is used to determine each webpage component part of the webpage.
Web data is obtained by view layer;Web data is sent to layout layer by view layer;It will by layout layer Web data replaces the content of corresponding webpage component part in topology file, obtains webpage, since topology file is for determining Each webpage component part of webpage solves server and draws therefore it may only be necessary to which quoting a topology file produces webpage The problem of auto-building html files low efficiency caused by more multiple common template file generated webpage, has reached raising auto-building html files effect The effect of rate.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is the method flow diagram of webpage generating method provided by one embodiment of the present invention;
Fig. 2A be another embodiment of the present invention provides webpage generating method method flow diagram;
Fig. 2 B is the schematic diagram of topology file provided in an embodiment of the present invention;
Fig. 2 C is the schematic diagram of view file provided in an embodiment of the present invention;
Fig. 2 D is the flow chart of auto-building html files provided in an embodiment of the present invention;
Fig. 3 is the structural framing figure of auto-building html files device provided by one embodiment of the present invention;
Fig. 4 is the structural framing figure for the auto-building html files device that yet another embodiment of the invention provides;
Fig. 5 is the structural framing figure of server provided by one embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
Referring to FIG. 1, it illustrates the method flow diagram of webpage generating method provided by one embodiment of the present invention, the net Page generation method can be applied to server.The webpage generating method, comprising:
Step 101, web data is obtained by view layer;
Web data refers to the data for generating webpage indicated by webpage acquisition request, which is visitor What family end was sent.
The web data that view layer is used to will acquire is processed into webpage.
Step 102, web data is sent to by layout layer by view layer;
If view layer calls layout, layer handles web data, needs for web data to be sent to layout layer.Its In, layout layer is for determining page layout format.
Step 103, the content that web data is replaced to corresponding webpage component part in topology file by layout layer, obtains To webpage, which is used to determine each webpage component part of webpage.
Topology file is used to determine each webpage component part of webpage and the position of each webpage component part and big It is small.For example, webpage component part can be head, sidebar, content bar or the bottom of webpage.Wherein, each in a topology file The position of a webpage component part and size are fixed, and the content of webpage component part can become with different webpages Change.
When generating webpage, web data can be replaced the content of webpage component part in topology file by server, will Replaced topology file is determined as the webpage generated.
In conclusion webpage generating method provided in an embodiment of the present invention, obtains web data by view layer;Pass through view Web data is sent to layout layer by figure layer;Web data is replaced into corresponding webpage composition portion in topology file by layout layer The content divided, obtains webpage, since topology file is used to determine each webpage component part of webpage, therefore it may only be necessary to quote One time topology file produces webpage, solves server and quotes net caused by more multiple common template file generated webpage The low problem of page formation efficiency has achieved the effect that improve auto-building html files efficiency.
Please refer to Fig. 2A, it illustrates another embodiment of the present invention provides webpage generating method method flow diagram, should Webpage generating method can be applied in server.The webpage generating method, comprising:
Step 201, web data is obtained by view layer;
Web data refers to the data for generating webpage indicated by webpage acquisition request, which is visitor What family end was sent.For example, web data can wrap if webpage acquisition request is used for the setting webpage for requesting to carry out personal settings Include the title of the setting webpage and the personal information of user etc..
The web data that view layer is used to will acquire is processed into webpage.Wherein, view layer can be obtained according to webpage and be asked Seek acquisition web data.Specifically, if server uses MVC (Model-View-Controller, model layer-view layer-control Preparative layer) mode, then carry control layer name and denomination of dive in webpage acquisition request, server can by the control layer from Web data is obtained in model layer, and respective handling is carried out to the web data, and by treated, web data is assigned to and moves Make the corresponding view file of title, view layer gets web data.If server only includes view layer, webpage acquisition request In carry view file title, the web data that server will acquire is sent to the view file, and view layer gets net Page data;Or, configuration is with view file corresponding to webpage acquisition request in entry file, the webpage that server will acquire Data are sent to the view file, and view layer gets web data.
Step 202, web data is sent to by layout layer by view layer;
If view layer calls layout, layer handles web data, needs for web data to be sent to layout layer.Its In, layout layer is for determining page layout format.
Step 203, view file indicated by webpage acquisition request is obtained by view layer, which is used for Requested webpage;Topology file used by view file is searched by view layer, which corresponds at least one view File;Topology file is determined as topology file corresponding with the web data by view layer;
Topology file is used to determine each webpage component part of webpage and the position of each webpage component part and big It is small.For example, webpage component part can be head, sidebar, content bar or the bottom of webpage.It please refers to and is laid out text shown in Fig. 2 B The schematic diagram of part, topology file includes a head, a sidebar, a content bar and a bottom, Fig. 2 B in Fig. 2 B (1) (2) topology file includes a head, a sidebar, two content bars and a bottom in.
Wherein, each topology file can correspond at least one view file, i.e., multiple view files are using same Topology file.Due to having included webpage component part in topology file, view file, which only needs to realize in webpage, to be changed Part, i.e. the content of webpage component part.The schematic diagram of view file shown in fig. 2 C is please referred to, Fig. 2 C includes N number of view File and N number of view file all uses topology file L, view file at this time are only needed comprising web page contents, and are not had to real Existing head, sidebar and bottom.Since the code on head, sidebar and bottom in N number of webpage only needs portion, generation is considerably reduced Code redundancy.
Due in server there are multiple topology files, view layer is determining view text according to webpage acquisition request After part, it is also necessary to topology file used by the view file is determined, to generate webpage according to the topology file.Work as view When the view file that layer determines is multiple, serially view file can be handled, view file can also be carried out parallel Processing.
Specifically, in editing view file, developer is to cloth used by the view file and the view file Corresponding relationship between office file is configured, therefore, available pair between view file and topology file of view layer It should be related to, then search topology file corresponding with view file in the corresponding relationship, the topology file found is determined as Topology file used by the view file.If topology file corresponding with the view file is not found in corresponding relationship, The topology file of default can be then determined as to topology file corresponding with the view file.
Step 204, if in web data including data corresponding with temporary variable, by view layer in template manager Middle registration temporary variable, making the variable list of topology file includes temporary variable;
In order to use topology file by multiple view files, the content of the webpage component part in topology file is Variable, therefore, the content of webpage component part in topology file can be indicated with placeholder, the size of the placeholder and position It sets and is determined when editing topology file.Wherein, the numerical value of placeholder can be set to sky, may be set to be other arbitrary numbers Value.
Optionally, if desired add temporary content in some webpage component part in topology file, then it can be at this Temporary variable is set in webpage component part, the size and location of the temporary variable is notified to give layout layer by view layer.Wherein, face The numerical value of variations per hour can be set to sky, may be set to be other any numbers.
Before using placeholder and temporary variable, it is also necessary to be registered in template manager.Wherein, placeholder can To be registered when editing topology file by layout layer, temporary variable can determine in web data in view layer to be included and faces It is registered when the corresponding data of variations per hour by view layer.Template manager can form all variables corresponding with the topology file Variable list, variable are placeholder or temporary variable.
Since web data includes the numerical value of variable name and variable, variable name in the variable name and topology file can be with It is identical, it can also be different, therefore, when carrying out variable registration, template manager can be to the variable name and net in topology file Variable name in page data establishes corresponding relationship.Wherein, template manager can set class for the variable in record variable Static variable accelerate processing speed so that topology file can be read directly when subsequent use.
It, then can be for example, the variable name " title " in web data is corresponding with variable name " Title " in topology file The corresponding relationship of " title " and " Title " is established in template manager.
Step 205, the content that web data is replaced to corresponding webpage component part in topology file by layout layer, obtains To webpage, which is used to determine each webpage component part of webpage.
When generating webpage, web data can be replaced the content of webpage component part in topology file by server, will Replaced topology file is determined as the webpage generated.
Wherein, the content that web data is replaced to corresponding webpage component part in topology file by layout layer, obtains Webpage, comprising:
1) each webpage component part in topology file is loaded by layout layer, the content of each webpage component part is used Variable indicates that variable is placeholder or temporary variable;
2) web data is replaced by the variable in corresponding webpage component part by layout layer, obtains webpage.
After determining topology file corresponding with view file, layer is laid out to each webpage composition portion in topology file Divide and is loaded.The present embodiment by webpage component part be head, the load for content bar, sidebar and bottom to topology file Mode is illustrated.Wherein, the loading sequence of each webpage component part is variable, only with head, content bar, sidebar and bottom Loading procedure is illustrated for the loading sequence in portion, then specific loading method is as follows:
1. loading head: layout layer determines position and the size on head first, is re-introduced into public pattern file and script File indicates the information such as the title, keyword and abstract of webpage with placeholder.If head further includes navigation bar, also need Determine position and the size of navigation bar.Wherein, the position of various pieces and size can be the determination when editing topology file, It is also possible to view layer notice layout layer.Layout layer reduces code redundancy by introducing public documents, to improve code effect Rate.
2. loading content column: layout layer determines position and the size of content bar, and web page contents are indicated with placeholder.
3. loading sidebar: layout layer determines position and the size of sidebar.
4. loading bottom: layout layer determines position and the size of bottom, introduces public information.Wherein, public information can be with It is copyright information and about our information etc..
It should be added that also needing will be interim if also added temporary content in above-mentioned webpage component part Content is indicated with temporary variable.For example, the temporary content is being added to head if temporary content is the countdown of world cup When, which is indicated with temporary variable.
Layout layer load webpage component part after, it is also necessary to by the variable replacement in each webpage component part be net Specific data in page data, obtain webpage.
Specifically, web data is replaced by the variable in corresponding webpage component part by layout layer, obtains webpage, wraps It includes:
1) variable list of topology file is obtained from template manager by being laid out layer, variable list includes for indicating The variable of the content of each webpage component part;
2) data corresponding with each variable are determined from web data by layout layer;
3) content that each data are replaced to webpage component part represented by corresponding variable by layout layer, obtains net Page.
Since all variables in the topology file were registered into template manager before, layout layer can To obtain the variable list of the topology file to template manager, each variable pair in determining and variable list in web data Data answered, and data are replaced to the numerical value of corresponding variable, obtain include each complete webpage component part webpage.
If template manager provide variable list be in web data variable name in topology file variable name it is corresponding Relationship, for ease of description, it can be assumed that entitled first variable name of variable in web data, the variable in topology file are entitled Second variable name, then the second variable name can be read by being laid out layer, determine the first variable name according to the second variable name and corresponding relationship, Data under first variable name are replaced to the numerical value of the second variable name.
It should be added that method provided in this embodiment, further includes:
1) modification to topology file is received by layout layer to request;
2) it is modified by layout layer at least one webpage component part indicated to modification request.
If correcting has occurred in website, the structure of webpage also can accordingly change, and therefore, it is necessary to carry out to topology file Modification.Specifically, layout layer can receive modification request, modification request indicate need the webpage component part modified and To the modification mode of the webpage component part, it is laid out layer and modifies according to the instruction of modification request to the webpage component part, Obtain modified topology file.Subsequent in use, modified topology file, which can be used, in layout layer generates webpage, generation Webpage be webpage after correcting.Due to only needing to modify the webpage after topology file produces correcting, without right Each webpage is modified, and the maintainability of webpage is improved.
For example, topology file such as Fig. 2 B (1) before modification is shown, if the modification request that layout layer receives indicates needs Content bar is split as two parts, then shown in modified topology file such as Fig. 2 B (2).
The flow chart of auto-building html files shown in Fig. 2 D is please referred to, the present embodiment is by taking server is using MVC pattern as an example to net Page product process is described, specific as follows:
211, model layer generates pending data, and pending data is sent to control layer;
212, control layer handles pending data, and the web data obtained after processing is assigned to parameter X;
213, view layer reads parameter X;
214, view layer registers the temporary variable in parameter X in template manager;
215, the web data in parameter X is sent to layout layer by view layer;
216, layout layer loads each webpage component part in topology file;
217, web data is replaced placeholder and temporary variable in each webpage component part by layout layer, obtains net Page;
218, webpage is sent to control layer by layout layer;
219, webpage is sent to client by control layer, is shown by client to the webpage.
In conclusion webpage generating method provided in an embodiment of the present invention, obtains web data by view layer;Pass through view Web data is sent to layout layer by figure layer;Web data is replaced into corresponding webpage composition portion in topology file by layout layer The content divided, obtains webpage, since topology file is used to determine each webpage component part of webpage, therefore it may only be necessary to quote One time topology file produces webpage, solves server and quotes net caused by more multiple common template file generated webpage The low problem of page formation efficiency has achieved the effect that improve auto-building html files efficiency.
It is requested in addition, receiving the modification to topology file by layout layer;Indicated to modification request by layout layer At least one webpage component part is modified, and due to only needing to modify when website revision to topology file, server draws With the webpage that the webpage that modified topology file generates is after correcting, the maintainability of webpage is improved.
Referring to FIG. 3, it illustrates the structural framing figure of auto-building html files device provided by one embodiment of the present invention, the net Page generating means can be applied in server.The auto-building html files device, comprising:
Data acquisition module 310, for obtaining web data by view layer;
Data transmission blocks 320, for being sent to the web data that data acquisition module 310 is got by view layer It is laid out layer;
Auto-building html files module 330 is formed for web data to be replaced corresponding webpage in topology file by layout layer Partial content, obtains webpage, and topology file is used to determine each webpage component part of webpage.
In conclusion auto-building html files device provided in an embodiment of the present invention, obtains web data by view layer;Pass through view Web data is sent to layout layer by figure layer;Web data is replaced into corresponding webpage composition portion in topology file by layout layer The content divided, obtains webpage, since topology file is used to determine each webpage component part of webpage, therefore it may only be necessary to quote One time topology file produces webpage, solves server and quotes net caused by more multiple common template file generated webpage The low problem of page formation efficiency has achieved the effect that improve auto-building html files efficiency.
Referring to FIG. 4, the structural framing figure of the auto-building html files device provided it illustrates yet another embodiment of the invention, the net Page generating means can be in application server.The auto-building html files device, comprising: data acquisition module 310, data transmission blocks 320 and auto-building html files module 330.
Data acquisition module 310, for obtaining web data by view layer;
Data transmission blocks 320, for being sent to the web data that data acquisition module 310 is got by view layer It is laid out layer;
Auto-building html files module 330 is formed for web data to be replaced corresponding webpage in topology file by layout layer Partial content, obtains webpage, and topology file is used to determine each webpage component part of webpage.
Optionally, auto-building html files module 330, comprising:
Webpage loading unit 331, for loading each webpage component part in topology file, each net by layout layer The content of page component part indicates that variable is placeholder or temporary variable with variable;
Data replacement unit 332, the correspondence for being loaded web data replacement webpage loading unit 331 by layout layer Webpage component part in variable, obtain webpage.
Optionally, data replacement unit 332, comprising:
List obtains subelement 3321, for obtaining the variable column of topology file from template manager by being laid out layer Table, variable list include the variable for indicating the content of each webpage component part;
Data determine subelement 3322, for obtaining subelement 3321 with list by the way that layout layer is determining from web data The corresponding data of each variable got;
Data replace subelement 3323, for being replaced each data that data determine that subelement 3322 determines by layout layer The content for changing webpage component part represented by corresponding variable, obtains webpage.
Optionally, device, further includes:
Variable registration module 340 is replaced web data in topology file by layout layer for auto-building html files module 330 The content of corresponding webpage component part, before obtaining webpage, if in web data including data corresponding with temporary variable, Temporary variable is registered in template manager by view layer, making the variable list of topology file includes temporary variable.
Optionally, device, further includes:
View obtains module 350, is replaced web data in topology file by layout layer for auto-building html files module 330 The content of corresponding webpage component part before obtaining webpage, obtains view indicated by webpage acquisition request by view layer File, webpage acquisition request are used for requested webpage;
It is laid out searching module 360, is adopted for searching the view file that view acquisition module 350 is got by view layer Topology file, topology file correspond at least one view file;
It is laid out determining module 370, for being determined as by view layer by the topology file that searching module 360 is found is laid out Topology file corresponding with web data.
Optionally, device, further includes:
Request receiving module 380 is requested for receiving the modification to topology file by layout layer;
Layout modification module 390, for by being laid out indicated by the modification request that layer receives request receiving module 380 At least one webpage component part modify.
In conclusion auto-building html files device provided in an embodiment of the present invention, obtains web data by view layer;Pass through view Web data is sent to layout layer by figure layer;Web data is replaced into corresponding webpage composition portion in topology file by layout layer The content divided, obtains webpage, since topology file is used to determine each webpage component part of webpage, therefore it may only be necessary to quote One time topology file produces webpage, solves server and quotes net caused by more multiple common template file generated webpage The low problem of page formation efficiency has achieved the effect that improve auto-building html files efficiency.
It is requested in addition, receiving the modification to topology file by layout layer;Indicated to modification request by layout layer At least one webpage component part is modified, and due to only needing to modify when website revision to topology file, server draws With the webpage that the webpage that modified topology file generates is after correcting, the maintainability of webpage is improved.
Referring to FIG. 5, it illustrates the structural framing figures of server provided by one embodiment of the present invention.The server 500 include central processing unit (CPU) 501, including random access memory (RAM) 502 and read-only memory (ROM) 503 System storage 504, and the system bus 505 of connection system storage 504 and central processing unit 501.The server 500 further include the basic input/output (I/O system) 506 of transmission information between each device helped in computer, and Mass-memory unit 507 for storage program area 513, application program 514 and other program modules 515.
The basic input/output 506 includes display 508 for showing information and inputs letter for user The input equipment 509 of such as mouse, keyboard etc of breath.Wherein the display 508 and input equipment 509 are all by being connected to The input and output controller 510 of system bus 505 is connected to central processing unit 501.The basic input/output 506 Can also include input and output controller 510 with for receive and handle from keyboard, mouse or electronic touch pen etc. it is multiple its The input of his equipment.Similarly, input and output controller 510 also provides output to display screen, printer or other kinds of defeated Equipment out.
The mass-memory unit 507 is by being connected to the bulk memory controller (not shown) of system bus 505 It is connected to central processing unit 501.The mass-memory unit 507 and its associated computer-readable medium are server 500 provide non-volatile memories.That is, the mass-memory unit 507 may include such as hard disk or CD-ROM The computer-readable medium (not shown) of driver etc.
Without loss of generality, the computer-readable medium may include computer storage media and communication media.Computer Storage medium includes information such as computer readable instructions, data structure, program module or other data for storage The volatile and non-volatile of any method or technique realization, removable and irremovable medium.Computer storage medium includes RAM, ROM, EPROM, EEPROM, flash memory or other solid-state storages its technologies, CD-ROM, DVD or other optical storages, tape Box, tape, disk storage or other magnetic storage devices.Certainly, skilled person will appreciate that the computer storage medium It is not limited to above-mentioned several.Above-mentioned system storage 504 and mass-memory unit 507 may be collectively referred to as memory.
According to various embodiments of the present invention, the server 500 can also be arrived by network connections such as internets Remote computer operation on network.Namely server 500 can be by the network interface that is connected on the system bus 505 Unit 511 is connected to network 512, in other words, Network Interface Unit 511 also can be used be connected to other kinds of network or Remote computer system (not shown).
The memory further includes that one or more than one program, the one or more programs are stored in In memory, for the one or more programs for executing webpage generating method, which is Fig. 1 and figure Webpage generating method shown by embodiment corresponding to 1;And/or the webpage generating method is the corresponding implementation of Fig. 2A and Fig. 2A Webpage generating method shown by example.
It should be understood that auto-building html files device provided by the above embodiment is when carrying out auto-building html files, only with above-mentioned each The division progress of functional module can according to need and for example, in practical application by above-mentioned function distribution by different function Energy module is completed, i.e., the internal structure of auto-building html files device is divided into different functional modules, described above complete to complete Portion or partial function.In addition, auto-building html files device provided by the above embodiment belong to webpage generating method embodiment it is same Design, specific implementation process are detailed in embodiment of the method, and which is not described herein again.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (13)

1. a kind of webpage generating method, which is characterized in that the described method includes:
Web data is obtained by view layer;
The web data is sent to layout layer by the view layer;
The content that the web data is replaced to corresponding webpage component part in topology file by the layout layer, obtains net Page, the topology file are used to determine that each webpage component part of the webpage, the topology file to correspond at least two View file, and each view file is for realizing the content of the webpage component part in different webpages.
2. the method according to claim 1, wherein described replaced the web data by the layout layer The content of corresponding webpage component part, obtains webpage in topology file, comprising:
Each webpage component part in the topology file, the content of each webpage component part are loaded by the layout layer It is indicated with variable, the variable is placeholder or temporary variable;
The web data is replaced into the variable in corresponding webpage component part by the layout layer, obtains the webpage.
3. according to the method described in claim 2, it is characterized in that, described replaced the web data by the layout layer Variable in corresponding webpage component part, obtains the webpage, comprising:
The variable list of the topology file is obtained from template manager by the layout layer, the variable list includes using In the variable for the content for indicating each webpage component part;
Data corresponding with each variable are determined from the web data by the layout layer;
The content that each data are replaced to webpage component part represented by corresponding variable by the layout layer, obtains described Webpage.
4. according to the method described in claim 3, it is characterized in that, described replaced the web data by the layout layer The content of corresponding webpage component part in topology file, before obtaining webpage, further includes:
If in the web data including data corresponding with the temporary variable, by the view layer in the template pipe The temporary variable is registered in reason device, making the variable list of the topology file includes the temporary variable.
5. the method according to claim 1, wherein described replaced the web data by the layout layer The content of corresponding webpage component part in topology file, before obtaining webpage, further includes:
View file indicated by webpage acquisition request is obtained by the view layer, the webpage acquisition request is for requesting institute State webpage;
Topology file used by the view file is searched by the view layer;
The topology file is determined as topology file corresponding with the web data by the view layer.
6. method according to any one of claims 1 to 5, which is characterized in that the method, further includes:
The modification to topology file is received by the layout layer to request;
It is modified by the layout layer at least one webpage component part indicated to the modification request.
7. a kind of auto-building html files device, which is characterized in that described device includes:
Data acquisition module, for obtaining web data by view layer;
Data transmission blocks, the web data for being got the data acquisition module by the view layer are sent Give layout layer;
Auto-building html files module is formed for the web data to be replaced corresponding webpage in topology file by the layout layer Partial content, obtains webpage, and the topology file is used to determine each webpage component part of the webpage, the layout text Part corresponds at least two view files, and each view file is for realizing in the webpage component part in different webpages Hold.
8. device according to claim 7, which is characterized in that the auto-building html files module, comprising:
Webpage loading unit, for loading each webpage component part in the topology file by the layout layer, each The content of webpage component part indicates that the variable is placeholder or temporary variable with variable;
Data replacement unit, for the web data to be replaced to pair of the webpage loading unit load by the layout layer The variable in webpage component part answered, obtains the webpage.
9. device according to claim 8, which is characterized in that the data replacement unit, comprising:
List obtains subelement, for obtaining the variable column of the topology file from template manager by the layout layer Table, the variable list include the variable for indicating the content of each webpage component part;
Data determine subelement, for obtaining subelement with the list by the way that the layout layer is determining from the web data The corresponding data of each variable got;
Data replace subelement, for the data to be determined the determining each data replacement pair of subelement by the layout layer The content of webpage component part represented by the variable answered, obtains the webpage.
10. device according to claim 9, which is characterized in that described device, further includes:
The web data is replaced topology file by the layout layer for the auto-building html files module by variable registration module In corresponding webpage component part content, before obtaining webpage, if including in the web data and the temporary variable pair The data answered then register the temporary variable by the view layer in the template manager, make the topology file Variable list includes the temporary variable.
11. device according to claim 7, which is characterized in that described device, further includes:
View obtains module, and the web data is replaced topology file by the layout layer for the auto-building html files module In corresponding webpage component part content, before obtaining webpage, by the view layer obtain webpage acquisition request indicated by View file, the webpage acquisition request is for requesting the webpage;
It is laid out searching module, obtains the view file institute that module is got for searching the view by the view layer The topology file of use;
It is laid out determining module, for determining the topology file that the layout searching module is found by the view layer For topology file corresponding with the web data.
12. according to the described in any item devices of claim 7 to 11, which is characterized in that described device, further includes:
Request receiving module is requested for receiving the modification to topology file by the layout layer;
Layout modification module, it is signified for being requested by the layout layer the modification that the request receiving module receives At least one the webpage component part shown is modified.
13. a kind of computer readable storage medium, the storage medium is stored with program, and described program is configured to be held by processor Webpage generating method of the row as described in claim 1 to 6 is any.
CN201410256418.9A 2014-06-10 2014-06-10 Webpage generating method and device Active CN105320662B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410256418.9A CN105320662B (en) 2014-06-10 2014-06-10 Webpage generating method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410256418.9A CN105320662B (en) 2014-06-10 2014-06-10 Webpage generating method and device

Publications (2)

Publication Number Publication Date
CN105320662A CN105320662A (en) 2016-02-10
CN105320662B true CN105320662B (en) 2019-09-20

Family

ID=55248065

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410256418.9A Active CN105320662B (en) 2014-06-10 2014-06-10 Webpage generating method and device

Country Status (1)

Country Link
CN (1) CN105320662B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105825402A (en) * 2016-03-17 2016-08-03 广州筷子信息科技有限公司 Method and device for orientating ad creative element
WO2018132956A1 (en) * 2017-01-18 2018-07-26 深圳市华第时代科技有限公司 Compatible method and device for iphone operating system and android operating system
CN110018864B (en) * 2018-01-09 2022-07-05 阿里巴巴集团控股有限公司 Page resource delivery method and device
CN108197090B (en) * 2018-02-01 2021-05-07 北京恒华伟业科技股份有限公司 Method and system for processing default value in file format conversion process
US20230058512A1 (en) * 2020-05-14 2023-02-23 Google Llc Efficiently rendering video having dynamic components

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101221572A (en) * 2008-01-25 2008-07-16 吴坤达 Web page data processing system
CN102902673A (en) * 2011-07-25 2013-01-30 北大方正集团有限公司 Method and device for dynamically generating web pages
CN103365847A (en) * 2012-03-27 2013-10-23 腾讯科技(深圳)有限公司 Generation method and device for user-defined webpage file

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001184344A (en) * 1999-12-21 2001-07-06 Internatl Business Mach Corp <Ibm> Information processing system, proxy server, web page display control method, storage medium and program transmitter

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101221572A (en) * 2008-01-25 2008-07-16 吴坤达 Web page data processing system
CN102902673A (en) * 2011-07-25 2013-01-30 北大方正集团有限公司 Method and device for dynamically generating web pages
CN103365847A (en) * 2012-03-27 2013-10-23 腾讯科技(深圳)有限公司 Generation method and device for user-defined webpage file

Also Published As

Publication number Publication date
CN105320662A (en) 2016-02-10

Similar Documents

Publication Publication Date Title
CN105320662B (en) Webpage generating method and device
CN106951451B (en) A kind of webpage content extracting method, device and calculate equipment
JP5219928B2 (en) Editing apparatus, editing method, and program
CN104281455A (en) Interface calling method and device and terminal
CN104252521A (en) Web content management using predetermined project templates
CN104391786A (en) Webpage automatic test system and method thereof
CN108804458A (en) A kind of reptile web retrieval method and apparatus
US8723870B1 (en) Selection of object types with data transferability
CN106127687A (en) Picture combination method and device, electronic equipment and system
CN105022619A (en) Code processing method and device
CN105373548A (en) Mobile device and event self-definition method for browser of mobile device
CN107741934A (en) page processing method and page processing system
CN115202729A (en) Container service-based mirror image generation method, device, equipment and medium
CN105608152A (en) Method and device for asynchronously loading webpage resources
JP6791254B2 (en) Program development support device, program development support method, and program development support program
CN113158619A (en) Document processing method and device, computer readable storage medium and computer equipment
CN104461893A (en) Data processing method and data processing device
CN105204883B (en) A kind of plug-in unit loading processing method and device
CN102323939A (en) Method and device for determining background information of rearranged elements in page rearranging process
CN106933439A (en) A kind of image processing method and system based on social platform
US8606773B2 (en) Method for combining and processing web data using tables and programming-by-demonstration
US20170031884A1 (en) Automated dependency management based on page components
CN105938431A (en) Web page developing method and device
CN114063996A (en) Method and equipment for generating webpage and storage medium
CN113282852A (en) Method and device for editing webpage

Legal Events

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