CN105320662A - Method and device for webpage generation - Google Patents

Method and device for webpage generation Download PDF

Info

Publication number
CN105320662A
CN105320662A CN201410256418.9A CN201410256418A CN105320662A CN 105320662 A CN105320662 A CN 105320662A CN 201410256418 A CN201410256418 A CN 201410256418A CN 105320662 A CN105320662 A CN 105320662A
Authority
CN
China
Prior art keywords
webpage
variable
layer
ingredient
topology file
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.)
Granted
Application number
CN201410256418.9A
Other languages
Chinese (zh)
Other versions
CN105320662B (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 method and device for webpage generation and belongs to the technical field of computers. The method comprises the steps of acquiring webpage data through a view layer; sending the webpage data to a layout layer through the view layer; and using the webpage data to replace contents of corresponding webpage components in a layout file through the layout layer, so as to obtain a webpage, wherein the layout file is used for determining each webpage component of the webpage. The device comprises a data acquiring module, a data sending module and a webpage generating module. According to the method and device for webpage generation, the problem that the webpage generation efficiency is low due to the fact that a server generates a webpage by citing a universal template file many times is solved, and the effect of improving webpage generation efficiency is achieved.

Description

Webpage generating method and device
Technical field
The present invention relates to field of computer technology, particularly a kind of webpage generating method and device.
Background technology
Terminal is when obtaining webpage to server, and can send webpage to server and obtain request, server obtains acquisition request web data according to this webpage, and according to web data generating web page, webpage is sent to terminal, the webpage that end-on receives shows.
Webpage can comprise head, sidebar and bottom usually, and therefore, developer can edit the common template file of head template file, sidebar template file and bottom template file and so on.When according to web data generating web page, server calls the common template file of editor successively, is added to respectively by web data in corresponding common template file, obtains webpage.
Inventor is realizing in process of the present invention, finds at least there is following defect in prior art:
Owing to needing to process multiple common template file when server generates each webpage, make server to file to quote number of times more, cause code redundancy, cause the efficiency of auto-building html files lower.
Summary of the invention
In order to settlement server quotes the inefficient problem of auto-building html files that common template file generated webpage more repeatedly causes, embodiments provide a kind of webpage generating method and device.Described technical scheme is as follows:
First aspect, embodiments provides a kind of webpage generating method, and described method comprises:
Web data is obtained by view layer;
By described view layer, described web data is sent to layout layer;
By described layout layer, described web data is replaced the content of webpage ingredient corresponding in topology file, obtain webpage, described topology file is for determining each webpage ingredient of described webpage.
Second aspect, embodiments provide a kind of auto-building html files device, described device comprises:
Data acquisition module, for obtaining web data by view layer;
Data transmission blocks, sends to layout layer for the described web data got by described data acquisition module by described view layer;
Auto-building html files module, for described web data being replaced by described layout layer the content of webpage ingredient corresponding in topology file, obtain webpage, described topology file is for determining each webpage ingredient of described webpage.
Web data is obtained by view layer; By view layer, web data is sent to layout layer; By layout layer, web data is replaced the content of webpage ingredient corresponding in topology file, obtain webpage, because topology file is for determining each webpage ingredient of webpage, therefore, only need to quote a topology file and get final product generating web page, solve server and quote the inefficient problem of auto-building html files that common template file generated webpage more repeatedly causes, reach the effect improving auto-building html files efficiency.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the method flow diagram of the webpage generating method that one embodiment of the invention provides;
Fig. 2 A is the method flow diagram of the webpage generating method that another embodiment of the present invention provides;
Fig. 2 B is the schematic diagram of the topology file that the embodiment of the present invention provides;
Fig. 2 C is the schematic diagram of the view file that the embodiment of the present invention provides;
Fig. 2 D is the process flow diagram of the auto-building html files that the embodiment of the present invention provides;
Fig. 3 is the structural framing figure of the auto-building html files device that one embodiment of the invention provides;
Fig. 4 is the structural framing figure of the auto-building html files device that yet another embodiment of the invention provides;
Fig. 5 is the structural framing figure of the server that one embodiment of the invention provides.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Please refer to Fig. 1, it illustrates the method flow diagram of the webpage generating method that one embodiment of the invention provides, this webpage generating method can be applied to server.This webpage generating method, comprising:
Step 101, obtains web data by view layer;
Web data refers to the data obtaining the webpage indicated by request for generating web page, and it is that client sends that this webpage obtains request.
View layer is used for the web data got to be processed into webpage.
Step 102, sends to layout layer by view layer by web data;
If view layer calls layout, layer processes web data, then need web data to send to layout layer.Wherein, layout layer is used for determining page layout format.
Step 103, by layout layer, web data is replaced the content of webpage ingredient corresponding in topology file, obtain webpage, this topology file is for determining each webpage ingredient of webpage.
Topology file is for the position of each webpage ingredient and each webpage ingredient of determining webpage and size.Such as, webpage ingredient can be the head of webpage, sidebar, content bar or bottom.Wherein, in a topology file, the position of each webpage ingredient and size are fixing, and the content of webpage ingredient can change along with different webpages.
When generating web page, web data can be replaced the content of webpage ingredient in topology file by server, the topology file after replacement is defined as the webpage generated.
In sum, the webpage generating method that the embodiment of the present invention provides, obtains web data by view layer; By view layer, web data is sent to layout layer; By layout layer, web data is replaced the content of webpage ingredient corresponding in topology file, obtain webpage, because topology file is for determining each webpage ingredient of webpage, therefore, only need to quote a topology file and get final product generating web page, solve server and quote the inefficient problem of auto-building html files that common template file generated webpage more repeatedly causes, reach the effect improving auto-building html files efficiency.
Please refer to Fig. 2 A, it illustrates the method flow diagram of the webpage generating method that another embodiment of the present invention provides, this webpage generating method can be applied in server.This webpage generating method, comprising:
Step 201, obtains web data by view layer;
Web data refers to the data obtaining the webpage indicated by request for generating web page, and it is that client sends that this webpage obtains request.Such as, if webpage obtains request for what ask to carry out personal settings and arranges webpage, then web data can comprise this and arranges the title of webpage and the personal information of user etc.
View layer is used for the web data got to be processed into webpage.Wherein, view layer can obtain acquisition request web data according to webpage.Particularly, if server adopts MVC (Model-View-Controller, model layer-view layer-key-course) pattern, then webpage obtains in request and carries key-course title and denomination of dive, server can obtain web data by this key-course from model layer, and respective handling is carried out to this web data, give the view file corresponding with denomination of dive by the web data assignment after process, view layer gets web data.If server only comprises view layer, then webpage obtains in request and carries view file title, and the web data got is sent to this view file by server, and view layer gets web data; Or in entry file, configuration and webpage obtain the view file corresponding to asking, and the web data got is sent to this view file by server, and view layer gets web data.
Step 202, sends to layout layer by view layer by web data;
If view layer calls layout, layer processes web data, then need web data to send to layout layer.Wherein, layout layer is used for determining page layout format.
Step 203, obtain webpage by view layer and obtain the view file indicated by asking, this webpage obtains request and is used for requested webpage; Search by view layer the topology file that view file adopts, this topology file corresponds at least one view file; By view layer, topology file is defined as the topology file corresponding with this web data;
Topology file is for the position of each webpage ingredient and each webpage ingredient of determining webpage and size.Such as, webpage ingredient can be the head of webpage, sidebar, content bar or bottom.Please refer to the schematic diagram of the topology file shown in Fig. 2 B, in Fig. 2 B (1), topology file comprises a head, sidebar, a content bar and a bottom, and in Fig. 2 B (2), topology file comprises a head, sidebar, two content bar and a bottom.
Wherein, each topology file can correspond at least one view file, and namely multiple view file adopts same topology file.Owing to having comprised webpage ingredient in topology file, therefore, view file only needs the part realizing changing in webpage, i.e. the content of webpage ingredient.Please refer to the schematic diagram of the view file shown in Fig. 2 C, Fig. 2 C comprises N number of view file and this N number of view file all adopts topology file L, and view file now only needs to comprise web page contents, and need not realize head, sidebar and bottom.Because the code of head in N number of webpage, sidebar and bottom only needs portion, considerably reduce code redundancy.
Owing to there is multiple topology file in server, therefore, view layer, after view file is determined in the request that obtains according to webpage, also needs the topology file determining that this view file adopts, thus according to this topology file generating web page.When the view file that view layer is determined is multiple, can serial process view file, also can walk abreast processes view file.
Particularly, when editing view file, corresponding relation between the topology file that developer adopts this view file and this view file is arranged, therefore, view layer can get the corresponding relation between view file and topology file, in this corresponding relation, search the topology file corresponding with view file again, the topology file found is defined as the topology file that this view file adopts.If do not find the topology file corresponding with this view file in corresponding relation, then the topology file of acquiescence can be defined as the topology file corresponding with this view file.
Step 204, if web data comprises the data corresponding with temporary variable, then registers temporary variable by view layer in template manager, makes the variable list of topology file comprise temporary variable;
Can be adopted by multiple view file to make topology file, the content of the webpage ingredient in topology file is variable, therefore, the content of webpage ingredient in topology file can be represented with placeholder, the size of this placeholder and position are determined when editing topology file.Wherein, the numerical value of placeholder can be set to sky, also can be set to other any number.
Optionally, add temporary content in certain the webpage ingredient if desired in topology file, then can arrange temporary variable in this webpage ingredient, the size of this temporary variable and position inform layout layer by view layer.Wherein, the numerical value of temporary variable can be set to sky, also can be set to other any number.
Before use placeholder and temporary variable, also need to register in template manager.Wherein, placeholder can be registered by layout layer when editing topology file, and temporary variable can be registered by view layer when view layer determination web data comprises the data corresponding with temporary variable.The all variablees corresponding with this topology file can be formed variable list by template manager, and variable is placeholder or temporary variable.
Because web data comprises the numerical value of variable name and variable, this variable name can be identical with the variable name in topology file, also can be different, therefore, when carrying out variable registration, template manager can set up corresponding relation to the variable name in topology file and the variable name in web data.Wherein, this variable set up, when record variable, can be the static variable of class, so that topology file can directly read during follow-up use, accelerate processing speed by template manager.
Such as, the variable name " title " in web data is corresponding with the variable name " Title " in topology file, then can set up the corresponding relation of " title " and " Title " in template manager.
Step 205, by layout layer, web data is replaced the content of webpage ingredient corresponding in topology file, obtain webpage, this topology file is for determining each webpage ingredient of webpage.
When generating web page, web data can be replaced the content of webpage ingredient in topology file by server, the topology file after replacement is defined as the webpage generated.
Wherein, by layout layer, web data is replaced the content of webpage ingredient corresponding in topology file, obtains webpage, comprising:
1) load each webpage ingredient in topology file by layout layer, the content of each webpage ingredient represents with variable, and variable is placeholder or temporary variable;
2) by layout layer web data replaced the variable in corresponding webpage ingredient, obtain webpage.
After determining the topology file corresponding with view file, layout layer loads each webpage ingredient in topology file.The present embodiment for webpage ingredient be head, content bar, sidebar and the bottom load mode to topology file is described.Wherein, the loading sequence of each webpage ingredient is variable, is only described loading procedure for the loading sequence of head, content bar, sidebar and bottom, then concrete load mode is as follows:
1. load head: first layout layer determines position and the size of head, then introduce public pattern file and script file, the information placeholders such as the title of webpage, key word and summary are represented.If head also comprises navigation bar, then also need position and the size of determining navigation bar.Wherein, the position of various piece and size can be determined when editing topology file, also can be view layer notice layout layers.Layout layer reduces code redundancy, to improve code efficiency by introducing public documents.
2. loading content hurdle: layout layer determines position and the size of content bar, is represented by web page contents placeholder.
3. sidebar is loaded: layout layer determines position and the size of sidebar.
4. bottom is loaded: layout layer determines position and the size of bottom, introduces public information.Wherein, public information can be copyright information and about our information etc.
It should be added that, if also added temporary content in above-mentioned webpage ingredient, then also need temporary content temporary variable to represent.Such as, if temporary content is the countdown of world cup, then when adding this temporary content to head, this countdown temporary variable is represented.
After layout layer has loaded webpage ingredient, also need the concrete data replaced with by the variable in each webpage ingredient in web data, obtained webpage.
Particularly, by layout layer by the variable in webpage ingredient corresponding for web data replacement, obtain webpage, comprising:
1) from template manager, obtained the variable list of topology file by layout layer, variable list comprises the variable of the content for representing each webpage ingredient;
2) from web data, the data corresponding with each variable are determined by layout layer;
3) by layout layer, each data are replaced the content of the webpage ingredient represented by corresponding variable, obtain webpage.
Due to all variablees before in template manager in this topology file registered, therefore, layout layer can obtain the variable list of this topology file to template manager, the data corresponding with variable each in variable list are determined in web data, and data are replaced the numerical value of corresponding variable, obtain the webpage comprising each complete webpage ingredient.
If the variable list that template manager provides is the corresponding relation of variable name in variable name and topology file in web data, for convenience of explanation, variable the first variable name by name in web data can be supposed, variable in topology file is called the second variable name, then layout layer can read the second variable name, determine the first variable name according to the second variable name and corresponding relation, the data under the first variable name are replaced the numerical value of the second variable name.
It should be added that the method that the present embodiment provides also comprises:
1) the amendment request to topology file is received by layout layer;
2) by layout layer, at least one the webpage ingredient indicated by amendment request is modified.
If website there occurs correcting, then the structure of webpage also can correspondingly change, and therefore, needs to modify to topology file.Particularly, layout layer can receive amendment request, this amendment request indicates needs the webpage ingredient of amendment and the alter mode to this webpage ingredient, and layout layer is modified to this webpage ingredient according to the instruction of amendment request, obtains amended topology file.When follow-up use, layout layer can use amended topology file generating web page, and the webpage of generation is the webpage after correcting.Owing to only needing amendment topology file can generate the webpage after correcting, and do not need to modify to each webpage, improve the maintainability of webpage.
Such as, the topology file before amendment is as shown in Fig. 2 B (1), and need content bar to be split as two parts if the amendment request that layout layer receives indicates, then amended topology file is as shown in Fig. 2 B (2).
Please refer to the process flow diagram of the auto-building html files shown in Fig. 2 D, the present embodiment adopts MVC pattern to be described auto-building html files flow process for server, specific as follows:
211, model layer generates pending data, and pending data are sent to key-course;
212, key-course processes pending data, and by the web data assignment that obtains after process 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 ingredient in topology file;
217, web data is replaced placeholder in each webpage ingredient and temporary variable by layout layer, obtains webpage;
218, webpage is sent to key-course by layout layer;
219, webpage is sent to client by key-course, is shown this webpage by client.
In sum, the webpage generating method that the embodiment of the present invention provides, obtains web data by view layer; By view layer, web data is sent to layout layer; By layout layer, web data is replaced the content of webpage ingredient corresponding in topology file, obtain webpage, because topology file is for determining each webpage ingredient of webpage, therefore, only need to quote a topology file and get final product generating web page, solve server and quote the inefficient problem of auto-building html files that common template file generated webpage more repeatedly causes, reach the effect improving auto-building html files efficiency.
In addition, the amendment request to topology file is received by layout layer; By layout layer, at least one the webpage ingredient indicated by amendment request is modified, owing to only needing to modify to topology file during website revision, server is quoted the webpage that amended topology file generates and is the webpage after correcting, improves the maintainability of webpage.
Please refer to Fig. 3, it illustrates the structural framing figure of the auto-building html files device that one embodiment of the invention provides, this auto-building html files device can be applied in server.This auto-building html files device, comprising:
Data acquisition module 310, for obtaining web data by view layer;
Data transmission blocks 320, for sending to layout layer by view layer by the web data that data acquisition module 310 gets;
Auto-building html files module 330, for web data being replaced by layout layer the content of webpage ingredient corresponding in topology file, obtain webpage, topology file is for determining each webpage ingredient of webpage.
In sum, the auto-building html files device that the embodiment of the present invention provides, obtains web data by view layer; By view layer, web data is sent to layout layer; By layout layer, web data is replaced the content of webpage ingredient corresponding in topology file, obtain webpage, because topology file is for determining each webpage ingredient of webpage, therefore, only need to quote a topology file and get final product generating web page, solve server and quote the inefficient problem of auto-building html files that common template file generated webpage more repeatedly causes, reach the effect improving auto-building html files efficiency.
Please refer to Fig. 4, it illustrates the structural framing figure of the auto-building html files device that yet another embodiment of the invention provides, this auto-building html files device can in application server.This 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 sending to layout layer by view layer by the web data that data acquisition module 310 gets;
Auto-building html files module 330, for web data being replaced by layout layer the content of webpage ingredient corresponding in topology file, obtain webpage, topology file is for determining each webpage ingredient of webpage.
Optionally, auto-building html files module 330, comprising:
Webpage loading unit 331, for being loaded each webpage ingredient in topology file by layout layer, the content of each webpage ingredient represents with variable, and variable is placeholder or temporary variable;
Data replacement unit 332, for by layout layer web data being replaced the variable in the webpage ingredient of the correspondence that webpage loading unit 331 loads, obtains webpage.
Optionally, data replacement unit 332, comprising:
List obtains subelement 3321, and for being obtained the variable list of topology file from template manager by layout layer, variable list comprises the variable of the content for representing each webpage ingredient;
Data determination subelement 3322, for determining to obtain with list data corresponding to each variable that subelement 3321 gets from web data by layout layer;
Data replace subelement 3323, and each data for being determined by data determination subelement 3322 by layout layer replace the content of the webpage ingredient represented by corresponding variable, obtain webpage.
Optionally, device, also comprises:
Variable Registering modules 340, by layout layer, web data is replaced the content of webpage ingredient corresponding in topology file for auto-building html files module 330, before obtaining webpage, if web data comprises the data corresponding with temporary variable, then in template manager, register temporary variable by view layer, make the variable list of topology file comprise temporary variable.
Optionally, device, also comprises:
View acquisition module 350, by layout layer, web data is replaced the content of webpage ingredient corresponding in topology file for auto-building html files module 330, before obtaining webpage, obtain webpage by view layer and obtain the view file indicated by asking, webpage obtains request and is used for requested webpage;
Layout searches module 360, the topology file that the view file got for being searched view acquisition module 350 by view layer is adopted, and topology file corresponds at least one view file;
Layout determination module 370, the topology file found for by view layer layout being searched module 360 is defined as the topology file corresponding with web data.
Optionally, device, also comprises:
Request receiving module 380, for receiving the amendment request to topology file by layout layer;
Layout modification module 390, is modified at least one the webpage ingredient indicated by the amendment request that received request receiving module 380 by layout layer.
In sum, the auto-building html files device that the embodiment of the present invention provides, obtains web data by view layer; By view layer, web data is sent to layout layer; By layout layer, web data is replaced the content of webpage ingredient corresponding in topology file, obtain webpage, because topology file is for determining each webpage ingredient of webpage, therefore, only need to quote a topology file and get final product generating web page, solve server and quote the inefficient problem of auto-building html files that common template file generated webpage more repeatedly causes, reach the effect improving auto-building html files efficiency.
In addition, the amendment request to topology file is received by layout layer; By layout layer, at least one the webpage ingredient indicated by amendment request is modified, owing to only needing to modify to topology file during website revision, server is quoted the webpage that amended topology file generates and is the webpage after correcting, improves the maintainability of webpage.
Please refer to Fig. 5, it illustrates the structural framing figure of the server that one embodiment of the invention provides.Described server 500 comprises CPU (central processing unit) (CPU) 501, comprises the system storage 504 of random access memory (RAM) 502 and ROM (read-only memory) (ROM) 503, and the system bus 505 of connected system storer 504 and CPU (central processing unit) 501.Described server 500 also comprises the basic input/output (I/O system) 506 of transmission information between each device in help computing machine, and for storing the mass-memory unit 507 of operating system 513, application program 514 and other program modules 515.
Described basic input/output 506 includes the input equipment 509 of the display 508 for showing information and the such as mouse, keyboard and so on for user's input information.Wherein said display 508 and input equipment 509 are all connected to CPU (central processing unit) 501 by the input/output control unit 510 being connected to system bus 505.Described basic input/output 506 can also comprise input/output control unit 510 for receiving and processing the input from other equipment multiple such as keyboard, mouse or electronic touch pens.Similarly, input/output control unit 510 also provides the output device outputting to display screen, printer or other types.
Described mass-memory unit 507 is connected to CPU (central processing unit) 501 by the bulk memory controller (not shown) being connected to system bus 505.Described mass-memory unit 507 and the computer-readable medium that is associated thereof provide non-volatile memories for server 500.That is, described mass-memory unit 507 can comprise the computer-readable medium (not shown) of such as hard disk or CD-ROM drive and so on.
Without loss of generality, described computer-readable medium can comprise computer-readable storage medium and communication media.Computer-readable storage medium comprises the volatibility and non-volatile, removable and irremovable medium that realize for any method or technology that store the information such as such as computer-readable instruction, data structure, program module or other data.Computer-readable storage medium comprises RAM, ROM, EPROM, EEPROM, flash memory or its technology of other solid-state storage, CD-ROM, DVD or other optical memory, tape cassete, tape, disk storage or other magnetic storage apparatus.Certainly, the known described computer-readable storage medium of those skilled in the art is not limited to above-mentioned several.Above-mentioned system storage 504 and mass-memory unit 507 can be referred to as storer.
According to various embodiments of the present invention, the remote computer that described server 500 can also be connected on network by networks such as such as the Internets runs.Also namely server 500 can be connected to network 512 by the network interface unit 511 be connected on described system bus 505, in other words, network interface unit 511 also can be used to be connected to network or the remote computer system (not shown) of other types.
Described storer also comprises one or more than one program, described more than one or one program is stored in storer, described more than one or one program is for performing webpage generating method, and this webpage generating method is the webpage generating method corresponding to Fig. 1 and Fig. 1 shown by embodiment; And/or this webpage generating method is the webpage generating method corresponding to Fig. 2 A and Fig. 2 A shown by embodiment.
It should be noted that: the auto-building html files device that above-described embodiment provides is when carrying out auto-building html files, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, inner structure by auto-building html files device is divided into different functional modules, to complete all or part of function described above.In addition, the auto-building html files device that above-described embodiment provides and webpage generating method embodiment belong to same design, and its specific implementation process refers to embodiment of the method, repeats no more here.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (12)

1. a webpage generating method, is characterized in that, described method comprises:
Web data is obtained by view layer;
By described view layer, described web data is sent to layout layer;
By described layout layer, described web data is replaced the content of webpage ingredient corresponding in topology file, obtain webpage, described topology file is for determining each webpage ingredient of described webpage.
2. method according to claim 1, is characterized in that, described content of by described layout layer, described web data being replaced webpage ingredient corresponding in topology file, is obtained webpage, comprising:
Loaded each webpage ingredient in described topology file by described layout layer, the content of each webpage ingredient represents with variable, and described variable is placeholder or temporary variable;
By described layout layer by the variable in webpage ingredient corresponding for described web data replacement, obtain described webpage.
3. method according to claim 2, is characterized in that, the described variable replaced described web data by described layout layer in corresponding webpage ingredient, is obtained described webpage, comprising:
From template manager, obtained the variable list of described topology file by described layout layer, described variable list comprises the variable of the content for representing each webpage ingredient;
From described web data, the data corresponding with each variable are determined by described layout layer;
By described layout layer, each data are replaced the content of the webpage ingredient represented by corresponding variable, obtain described webpage.
4. method according to claim 3, is characterized in that, described content of by described layout layer, described web data being replaced webpage ingredient corresponding in topology file, before obtaining webpage, is also comprised:
If described web data comprises the data corresponding with described temporary variable, then in described template manager, register described temporary variable by described view layer, make the variable list of described topology file comprise described temporary variable.
5. method according to claim 1, is characterized in that, described content of by described layout layer, described web data being replaced webpage ingredient corresponding in topology file, before obtaining webpage, is also comprised:
Obtain webpage by described view layer and obtain the view file indicated by asking, described webpage obtains request for asking described webpage;
Search by described view layer the topology file that described view file adopts, described topology file corresponds at least one view file;
By described view layer, described topology file is defined as the topology file corresponding with described web data.
6. the method according to any one of claim 1 to 5, is characterized in that, described method, also comprises:
The amendment request to topology file is received by described layout layer;
By described layout layer, at least one the webpage ingredient indicated by described amendment request is modified.
7. an auto-building html files device, is characterized in that, described device comprises:
Data acquisition module, for obtaining web data by view layer;
Data transmission blocks, sends to layout layer for the described web data got by described data acquisition module by described view layer;
Auto-building html files module, for described web data being replaced by described layout layer the content of webpage ingredient corresponding in topology file, obtain webpage, described topology file is for determining each webpage ingredient of described webpage.
8. device according to claim 7, is characterized in that, described auto-building html files module, comprising:
Webpage loading unit, for being loaded each webpage ingredient in described topology file by described layout layer, the content of each webpage ingredient represents with variable, and described variable is placeholder or temporary variable;
Data replacement unit, for described web data being replaced by described layout layer the variable in the webpage ingredient of the correspondence of described webpage loading unit loading, obtains described webpage.
9. device according to claim 8, is characterized in that, described data replacement unit, comprising:
List obtains subelement, and for being obtained the variable list of described topology file from template manager by described layout layer, described variable list comprises the variable of the content for representing each webpage ingredient;
Data determination subelement, for determining to obtain with described list data corresponding to each variable that subelement gets from described web data by described layout layer;
Data replace subelement, and each data for being determined by described data determination subelement by described layout layer replace the content of the webpage ingredient represented by corresponding variable, obtain described webpage.
10. device according to claim 9, is characterized in that, described device, also comprises:
Variable Registering modules, by described layout layer, described web data is replaced the content of webpage ingredient corresponding in topology file for described auto-building html files module, before obtaining webpage, if described web data comprises the data corresponding with described temporary variable, then in described template manager, register described temporary variable by described view layer, make the variable list of described topology file comprise described temporary variable.
11. devices according to claim 7, is characterized in that, described device, also comprises:
View acquisition module, by described layout layer, described web data is replaced the content of webpage ingredient corresponding in topology file for described auto-building html files module, before obtaining webpage, obtain webpage by described view layer and obtain the view file indicated by asking, described webpage obtains request for asking described webpage;
Layout searches module, the topology file that the described view file got for being searched described view acquisition module by described view layer is adopted, and described topology file corresponds at least one view file;
Layout determination module, for by described view layer described layout searched module searches to described topology file be defined as the topology file corresponding with described web data.
12. devices according to any one of claim 7 to 11, it is characterized in that, described device, also comprises:
Request receiving module, for receiving the amendment request to topology file by described layout layer;
Layout modification module, for modifying to described at least one webpage ingredient revised indicated by request that described request receiver module receives by described layout layer.
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 true CN105320662A (en) 2016-02-10
CN105320662B 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)

Cited By (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
CN108197090A (en) * 2018-02-01 2018-06-22 北京恒华伟业科技股份有限公司 The processing method and system of default value in file format transfer process
WO2018132956A1 (en) * 2017-01-18 2018-07-26 深圳市华第时代科技有限公司 Compatible method and device for iphone operating system and android operating system
CN110018864A (en) * 2018-01-09 2019-07-16 阿里巴巴集团控股有限公司 Page resource put-on method and device
CN113966619A (en) * 2020-05-14 2022-01-21 谷歌有限责任公司 Rendering video with dynamic components

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010054049A1 (en) * 1999-12-21 2001-12-20 Junji Maeda Information processing system, proxy server, web page display method, storage medium, and program transmission apparatus
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

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010054049A1 (en) * 1999-12-21 2001-12-20 Junji Maeda Information processing system, proxy server, web page display method, storage medium, and program transmission apparatus
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

Cited By (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
CN110018864A (en) * 2018-01-09 2019-07-16 阿里巴巴集团控股有限公司 Page resource put-on method and device
CN108197090A (en) * 2018-02-01 2018-06-22 北京恒华伟业科技股份有限公司 The processing method and system of default value in file format transfer process
CN113966619A (en) * 2020-05-14 2022-01-21 谷歌有限责任公司 Rendering video with dynamic components

Also Published As

Publication number Publication date
CN105320662B (en) 2019-09-20

Similar Documents

Publication Publication Date Title
WO2020119485A1 (en) Page display method and device, apparatus, and storage medium
CN104866383A (en) Interface calling method and device and terminal
US10754869B2 (en) Managing data format of data received from devices in an internet of things network
CN115617327A (en) Low code page building system, method and computer readable storage medium
CN105320662A (en) Method and device for webpage generation
US20210208854A1 (en) System and method for enhancing component based development models with auto-wiring
US20150040098A1 (en) Systems and methods for developing and delivering platform adaptive web and native application content
CN105373390A (en) OEM-oriented online software customization packaging release method and apparatus
CN111177618A (en) Website building method, device, equipment and computer readable storage medium
CN112395253B (en) Index file generation method, terminal device, electronic device and medium
CN113110829B (en) Multi-UI component library data processing method and device
CN104267921A (en) Page display control method and server
CN112394932A (en) Automatic browser webpage skin changing method and device
CN111666100A (en) Software framework generation method and device, electronic equipment and storage medium
CN104834759A (en) Realization method and device for electronic design
CN112905225A (en) Method and device for creating continuous integration tool construction task
CN114048583A (en) Application method and system for extending real object ID based on GIM model
CN110968339B (en) Method and device for front-end building tool and electronic equipment
CN113094125A (en) Business process processing method, device, server and storage medium
CN104598554A (en) Webpage page loading method and device
CN109977317B (en) Data query method and device
CN103970773A (en) Page updating method and device for web page
JP2019008799A (en) System and method for merging source data from source application into target data of target application
CN105094881A (en) Terminal and terminal application management method
CN114115864A (en) Interface generation method and device and electronic equipment

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