CN108279903A - The method and device of page presentation - Google Patents

The method and device of page presentation Download PDF

Info

Publication number
CN108279903A
CN108279903A CN201810157571.4A CN201810157571A CN108279903A CN 108279903 A CN108279903 A CN 108279903A CN 201810157571 A CN201810157571 A CN 201810157571A CN 108279903 A CN108279903 A CN 108279903A
Authority
CN
China
Prior art keywords
page
requested
template
layout template
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810157571.4A
Other languages
Chinese (zh)
Inventor
马东辉
单飞龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing CHJ Information Technology Co Ltd
Original Assignee
Beijing CHJ Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing CHJ Information Technology Co Ltd filed Critical Beijing CHJ Information Technology Co Ltd
Priority to CN201810157571.4A priority Critical patent/CN108279903A/en
Publication of CN108279903A publication Critical patent/CN108279903A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Document Processing Apparatus (AREA)

Abstract

Embodiment of the disclosure provides a kind of method and device of page presentation, is related to Internet technical field, can solve the problems, such as that page code redundancy is more in the prior art, page layout modification efficiency is low.The method of embodiment of the disclosure includes mainly:Obtain the page data of page requested;Page layout template information defined in the page data, reads the page layout template corresponding to the page requested, and the page layout template includes the shared content of the page special substantial occupy-place label and multiple pages;The correspondence occupy-place label in the page layout template is replaced using the peculiar content of the page requested defined in the page data;Treated that page layout template is rendered to replacing, to show the page requested.Embodiment of the disclosure is primarily adapted for use in the scene of displayed page.

Description

The method and device of page presentation
Technical field
Embodiment of the disclosure is related to Internet technical field more particularly to a kind of method and device of page presentation.
Background technology
With the development of internet, more and more contents are shown by carrier of Webpage, and people can pass through The electronic equipments such as computer, mobile phone conveniently and efficiently find the resource needed for oneself from network.For example, people can be clear Input keyword in device of looking at scans for, and obtains and the keyword is relevant links, and then by the interested link of click, makes It obtains browser-presented and goes out the content of pages corresponding to the link.
One page is often made of several components and page particular content, as shown in Figure 1, technical staff is compiling at present When writing the page, required infrastructure component (content that the label 1 in such as Fig. 1 indicates) is often first defined, is then write specific Page code, and when writing page code, introduced the infrastructure component of definition by quoting code (such as #include) To (content that the label 2 in such as Fig. 1 indicates) in the page code currently write;In subsequent user accession page, by straight It connects load and renders the mode of the page code and show the page.It follows that at present technical staff when writing page code, It needs to write a large amount of reference code for each page respectively, code redundancy is more;To the integral layouts of multiple pages into When row modification, it is also desirable to individually be changed these pages, modification is less efficient.
Invention content
In a first aspect, embodiment of the disclosure provides a kind of method of page presentation, the method includes:
Obtain the page data of page requested;
Page layout template information defined in the page data, reads the page corresponding to the page requested Face layout templates, the page layout template include the shared content of the page special substantial occupy-place label and multiple pages;
The page layout template is replaced using the peculiar content of the page requested defined in the page data In correspondence occupy-place label;
Treated that page layout template is rendered to replacing, to show the page requested.
In some embodiments, the page layout template information defined in the page data, described in reading Page layout template corresponding to page requested includes:
Page layout template information defined in the page data obtains template store path;
By the template store path, the page layout template corresponding to the page requested is read.
In some embodiments, the page layout template information defined in the page data obtains template Store path includes:
The page layout template mark defined in the page data is obtained, and searches the page from the configuration file The corresponding template store path of face layout templates mark;
Alternatively, obtaining the template store path stored in the page data.
In some embodiments, the page data for obtaining page requested includes:
Overload resolution class and processing class;
The page data of the page requested is obtained by the processing class;
The page data of acquisition is initialised in the parsing class, so that the parsing class gets the page number According to.
In some embodiments, the parsing class includes:ViewResolver classes;The processing class includes FreeMarkerView classes.
In some embodiments, the peculiar content of page requested described in the page data is carried out in a manner of macro Definition.
In some embodiments, the peculiar content of page requested described in the page data is macro with freemarker Mode be defined.
In some embodiments, the method further includes:
When in the page data without defining page layout template information, the page data is rendered, to show State the accessed page.
Second aspect, embodiment of the disclosure provide a kind of device of page presentation, and described device includes:
Acquiring unit, the page data for obtaining page requested;
Reading unit is read described requested for the page layout template information defined in the page data Page layout template corresponding to the page, the page layout template include the special substantial occupy-place label of the page and multiple pages Shared content;
Replacement unit, described in being replaced using the peculiar content of the page requested defined in the page data Correspondence occupy-place label in page layout template;
Rendering unit, for treated that page layout template is rendered to replacing, to show the page requested.
In some embodiments, the reading unit includes:
First acquisition module obtains template and deposits for the page layout template information defined in the page data Store up path;
Read module, for by the template store path, reading the page layout corresponding to the page requested Template.
In some embodiments, first acquisition module, for obtaining the page layout defined in the page data Template identification, and the corresponding template store path of the page layout template mark is searched from the configuration file;Alternatively, Obtain the template store path stored in the page data.
In some embodiments, the acquiring unit includes:
Heavily loaded module, for overload resolution class and processing class;
Second acquisition module, the page data for obtaining the page requested by the processing class;
Initialization module, for the page data of acquisition to be initialised in the parsing class, so that the parsing class Get the page data.
In some embodiments, the parsing class includes:ViewResolver classes;The processing class includes FreeMarkerView classes.
In some embodiments, the peculiar content of page requested described in the page data is carried out in a manner of macro Definition.
In some embodiments, the peculiar content of page requested described in the page data is macro with freemarker Mode be defined.
In some embodiments, the rendering unit is additionally operable to define page layout mould when no in the page data When plate information, the page data is rendered, to show the accessed page.
The third aspect, embodiment of the disclosure provide a kind of storage medium, and the storage medium is stored with a plurality of instruction, The method that described instruction is suitable for being loaded by processor and executing page presentation as described in relation to the first aspect.
Fourth aspect, embodiment of the disclosure provide a kind of electronic equipment, the electronic equipment include storage medium and Processor;
The processor is adapted for carrying out each instruction;
The storage medium is suitable for storing a plurality of instruction;
The method that described instruction is suitable for being loaded by the processor and executing page presentation as described in relation to the first aspect.
Above description is only the general introduction of embodiment of the disclosure technical solution, in order to better understand the reality of the disclosure Apply the technological means of example, and can be implemented in accordance with the contents of the specification, and in order to allow the above-mentioned of embodiment of the disclosure and Other objects, features and advantages can be clearer and more comprehensible, below the special specific implementation mode for lifting the disclosure.
Description of the drawings
By reading the detailed description of hereafter preferred embodiment, various other advantages and benefit are common for this field Technical staff will become clear.Attached drawing only for the purpose of illustrating preferred embodiments, and is not considered as to the disclosure Embodiment limitation.And throughout the drawings, the same reference numbers will be used to refer to the same parts.In the accompanying drawings:
Fig. 1 shows the page encoding examples figure that the prior art provides;
Fig. 2 shows a kind of flow charts of the method for page presentation of embodiment of the disclosure offer;
Fig. 3 shows a kind of exemplary plot of the method for page presentation that embodiment of the disclosure provides;
Fig. 4 shows the flow chart of the method for another page presentation that embodiment of the disclosure provides;
Fig. 5 shows a kind of composition frame chart of the device for page presentation that embodiment of the disclosure provides;
Fig. 6 shows the composition frame chart of the device for another page presentation that embodiment of the disclosure provides.
Specific implementation mode
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in attached drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure without should be by embodiments set forth here It is limited.On the contrary, these embodiments are provided to facilitate a more thoroughly understanding of the present invention, and can be by the scope of the present disclosure Completely it is communicated to those skilled in the art.
In a first aspect, embodiment of the disclosure provides a kind of method of page presentation, as shown in Fig. 2, the method master Including:
101, the page data of page requested is obtained.
Its peculiar content and page requested relative to other pages are encoded in the page data of page requested Page layout template information.Wherein, page layout template information can be page layout template mark (such as page layout mould Board name), or template store path.Peculiar content includes page assembly and/or page particular content.
After user clicks some link by browser or other application, terminal is provided according to the unification that the link carries Source finger URL (Uniform Resource Locator, URL) obtains corresponding page data from local or server side, To search corresponding page layout template according to page data, and combine the page of page layout template displaying user's request Face.
It, can the first page data defined in configuration file and page cloth in addition, technical staff is when writing page data Label needed for office's template, then writes page data and page layout template based on the label in configuration file again.
Illustratively, the code that configuration file defines label includes:
<Property name=" layoutMacros ">
<array>
<value>pageStyle</value>
<value>pageScript</value>
<value>pageHeader</value>
<value>pageFooter</value>
<value>pageBody</value>
<value>pageTop</value>
<value>pageBottom</value>
<value>pageNavigation</value>
</array>
</property>
Wherein, pageStyle, pageScript, pageHeader, pageFooter, pageBody, pageTop, PageBottom and pageNavigation is the label of definition.
Based on configuration file, above-mentioned label is introduced in such a way that freemarker is macro, the page data of acquisition includes:
${page.setLayoutName("default")}<!- specify the layout layout titles used -->
<#macro pageStyle>
Style sheet
</#macro>
<#macro pageBody>
Page particular content
</#macro>
<#macro pageTop>
Top contents
</#macro>
<#macro pageBottom>
Bottom contents
</#macro>
102, the page layout template information defined in the page data, reads corresponding to the page requested Page layout template.
Wherein, the page layout template includes the shared content of the page special substantial occupy-place label and multiple pages, And occupy-place label and shared content are write according to page layout.Shared content includes page assembly and/or page tool Hold in vivo.
Essential information (the i.e. page cloth defined in page data about page layout template is referred in above-mentioned steps 101 Office's Template Information), therefore after getting page data, page layout template information can be obtained from page data, then According to page layout template information searching and read corresponding page layout template.Specifically, page layout template information includes Page layout template identifies or template store path, therefore can store road according to page layout template identifier lookup template Page layout template is searched further according to template store path and read to diameter, can also directly be searched simultaneously according to template store path Read page layout template.
Illustratively, the label defined based on configuration file, the page layout template write include:
<!DOCTYPE HTML>
<html>
<head>
<Meta charset=" UTF-8 ">
<#include"include/head.ftl"><!-- common include can be used --->
<@pageStyle/><!-- defining style pattern placeholders -->
</head>
<body>
<@pageTop/><!-- defining the heads Top placeholder -->
<@pageBody/><!-- defining body content place holders -->
<@pageBottom/><!-- defining the bottoms Bottom placeholder -->
</body>
</html>
103, the page layout is replaced using the peculiar content of the page requested defined in the page data Correspondence occupy-place label in template.
Since occupy-place label is used to occupy in page layout template, so getting page data and page layout After template, the peculiar content in page data can be replaced corresponding occupy-place label in page layout template so that occupy-place mark Become true specific data at the shared position of label, is browsed for user to obtain a complete content of pages.
Wherein, the peculiar content of page requested described in the page data is defined in a manner of macro;It is macro It can be that freemarker is macro, can also be the macro of other technologies.The prior art that code is write in repetition uses jsp skills Art, when embodiment of the disclosure uses freemarker technologies, due to the parsing effect of the analyzing efficiency ratio jsp of freemarker Rate is high, so the page parsing efficiency using freemarker technologies is also relatively high.
Illustratively, as shown in figure 3, there is the peculiar content of page layout template layout1.jsp, the page defined in the page 1 1_head, 1_body, page layout template layout1.jsp have head placeholders, body placeholders according to page layout definition It can be according in the page 1 when user requests webpage with shared content (including banner components and bottom components) Layout1.jsp finds corresponding page layout template, and then the 1_head in the page 1 is substituted into layout1.jsp Head placeholders, 1_body is substituted into the body placeholders in layout1.jsp, generates page layout of replacing that treated Template (label 4 in Fig. 2), and treated that page layout template renders to the replacement, to show the page of user's request Face.
104, treated that page layout template is rendered to replacing, to show the page requested.
After by the occupy-place tag replacement in page layout template for specific peculiar content, page layout template reforms into Complete page requested, thus can directly treated that page layout template is rendered to replacing, after the completion of to be rendered, User can see that complete page requested.
The method for the page presentation that embodiment of the disclosure provides, can only write in the page data of page requested Peculiar content of the page requested relative to other pages, and by the page requested relative to the shared interior of other pages Hold, is then programmed in the page layout template corresponding to the page requested, and in page layout template and is additionally provided with page spy Substantial occupy-place label there is also defined page layout template information in page data, to ask to access the page as user When, corresponding page layout template can be read according to the page layout template information in page data, then use page number Peculiar content defined in replaces the correspondence occupy-place label in page layout template, the page layout template that will replace that treated The final page as user's request carries out rendering displaying.It follows that embodiment of the disclosure is only by the peculiar of current page Content is programmed in page data, and the shared content of multiple pages has been programmed in a page layout template, without weight Shared content is write again, it, can be with to reduce page code redundancy, and when needing to change the integral layout of multiple pages Page layout template is only changed, is individually changed without being directed to each page data, and then improves page layout modification Efficiency.
In some embodiments, according to method shown in Fig. 2, another embodiment of the disclosure additionally provides a kind of page The method of displaying, as shown in figure 4, the method includes mainly:
201, the page data of page requested is obtained.
Specifically, terminal can first overload resolution class and processing class, described be requested then is obtained by the processing class The page data of acquisition is finally initialised in the parsing class by the page data of the page, so that the parsing class obtains To the page data, and the page data to getting carries out dissection process.Wherein, the parsing class includes: ViewResolver classes;The processing class includes FreeMarkerView classes.ViewResolver classes and FreeMarkerView Class is located at the ViewResolver stages handled view in spring mvc.
202, judge page layout template information whether has been defined in the page data;Defined in the page data When having page layout template information, step 203-205 is executed;Page layout template information is defined when no in the page data When, execute step 206.
After getting page data, can by judge whether to be assigned in page data page layout template mark or Person's template store path, to determine whether the page data is assigned with page layout template;Contain page in page data when determining When face layout templates mark or template store path, it may be determined that the page data is assigned with page layout template, and starts Execute step 203-205;There is no page layout template to identify or when template store path when determining in page data, it can be true The fixed page data does not have specified page layout templates, and starts to execute step 206.
203, the page layout template information defined in the page data, reads corresponding to the page requested Page layout template.
Specifically, template store path can be obtained according to the page layout template information defined in the page data; Then by the template store path, the page layout template corresponding to the page requested is read.Due to page layout Template Information may be page layout mark, it is also possible to template store path, so according to defined in the page data Page layout template information, obtaining the specific implementation of template store path can be:It obtains defined in the page data Page layout template mark, and search from the configuration file the corresponding template storage of the page layout template mark Path;Alternatively, obtaining the template store path stored in the page data.
204, the page layout is replaced using the peculiar content of the page requested defined in the page data Correspondence occupy-place label in template.
The specific implementation of this step is identical as the specific implementation of above-mentioned steps 103, and details are not described herein.
205, treated that page layout template is rendered to replacing, to show the page requested.
The specific implementation of this step is identical as the specific implementation of above-mentioned steps 104, and details are not described herein.
206, the page data is rendered, to show the accessed page.
When in page data without defining page layout template information, illustrate that the page data is exactly complete page number According to, therefore can directly the page be accessed to be shown to user by being rendered to the page data.
You need to add is that when in page data without defining page layout template information, page data is that have one When determining page layout, and having page layout template information defined in the page data, page data can not have page layout.
Second aspect, according to above method embodiment, another embodiment of the disclosure additionally provides a kind of page presentation Device, as shown in figure 5, described device includes mainly:Acquiring unit 31, reading unit 32, replacement unit 33 and rendering unit 34.Wherein,
Acquiring unit 31, the page data for obtaining page requested;
Reading unit 32 reads described asked for the page layout template information defined in the page data It includes the special substantial occupy-place label of the page and multiple pages to ask the page layout template corresponding to the page, the page layout template The shared content in face;
Replacement unit 33, for replacing institute using the peculiar content of the page requested defined in the page data State the correspondence occupy-place label in page layout template;
Rendering unit 34, for treated that page layout template is rendered to replacing, to show the requested page Face.
In some embodiments, as shown in fig. 6, the reading unit 32 includes:
First acquisition module 321 obtains template for the page layout template information defined in the page data Store path;
Read module 322, for by the template store path, reading the page cloth corresponding to the page requested Office's template.
In some embodiments, first acquisition module 321, for obtaining the page cloth defined in the page data Office's template identification, and the corresponding template store path of the page layout template mark is searched from the configuration file;Or Person obtains the template store path stored in the page data.
In some embodiments, as shown in fig. 6, the acquiring unit 31 includes:
Heavily loaded module 311, for overload resolution class and processing class;
Second acquisition module 312, the page data for obtaining the page requested by the processing class;
Initialization module 313, for the page data of acquisition to be initialised in the parsing class, so that the parsing Class gets the page data.
In some embodiments, the parsing class includes:ViewResolver classes;The processing class includes FreeMarkerView classes.
In some embodiments, the peculiar content of page requested described in the page data is carried out in a manner of macro Definition.
In some embodiments, the peculiar content of page requested described in the page data is macro with freemarker Mode be defined.
In some embodiments, the rendering unit 34 is additionally operable to define page layout when no in the page data When Template Information, the page data is rendered, to show the accessed page.
The device for the page presentation that embodiment of the disclosure provides, can only write in the page data of page requested Peculiar content of the page requested relative to other pages, and by the page requested relative to the shared interior of other pages Hold, is then programmed in the page layout template corresponding to the page requested, and in page layout template and is additionally provided with page spy Substantial occupy-place label there is also defined page layout template information in page data, to ask to access the page as user When, corresponding page layout template can be read according to the page layout template information in page data, then use page number Peculiar content defined in replaces the correspondence occupy-place label in page layout template, the page layout template that will replace that treated The final page as user's request carries out rendering displaying.It follows that embodiment of the disclosure is only by the peculiar of current page Content is programmed in page data, and the shared content of multiple pages has been programmed in a page layout template, without weight Shared content is write again, it, can be with to reduce page code redundancy, and when needing to change the integral layout of multiple pages Page layout template is only changed, is individually changed without being directed to each page data, and then improves page layout modification Efficiency.
The device of the page presentation includes pocessor and storage media, above-mentioned acquiring unit, reading unit, replacement unit It is stored in a storage medium, is stored in a storage medium by processor execution above-mentioned as program unit with rendering unit etc. Program unit realizes corresponding function.
Include kernel in above-mentioned processor, is gone in storage medium to transfer corresponding program unit by kernel.Kernel can be set One or more is set, efficiency is changed to reduce page code redundancy, improve page layout by adjusting kernel parameter.
The device for the page presentation that the embodiment of second aspect provides, can be carried to execute the embodiment of first aspect The method of the page presentation of confession, the relevant meaning being used for and specific embodiment may refer to the embodiment of first aspect In associated description, be no longer described in detail herein.
The third aspect, according to above-described embodiment, another embodiment of the disclosure additionally provides a kind of storage medium, described Storage medium is stored with a plurality of instruction, and described instruction is suitable for being loaded by processor and being executed the side of page presentation as described above Method.
Storage medium may include the volatile memory in computer-readable medium, random access memory (RAM) And/or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM), memory includes at least one Storage chip.
The instruction stored in the storage medium that embodiment of the disclosure provides, can be in the page data of page requested Only write peculiar content of the page requested relative to other pages, and being total to relative to other pages by the page requested There is content, is then programmed in the page layout template corresponding to the page requested, and be additionally provided with page in page layout template The special substantial occupy-place label in face there is also defined page layout template information in page data, to when user asks to access should When the page, corresponding page layout template can be read according to the page layout template information in page data, then use page Peculiar content defined in face data replaces the correspondence occupy-place label in page layout template, the page layout that will replace that treated Template carries out rendering displaying as the final page that user asks.It follows that embodiment of the disclosure is only by current page Peculiar content is programmed in page data, and the shared content of multiple pages has been programmed in a page layout template, nothing It need to repeat to write shared content, to reduce page code redundancy, and when needing to change the integral layout of multiple pages, Page layout template can be only changed, is individually changed without being directed to each page data, and then improve page layout Change efficiency.
Fourth aspect, according to above-described embodiment, another embodiment of the disclosure additionally provides a kind of electronic equipment, described Electronic equipment includes storage medium and processor;
The processor is adapted for carrying out each instruction;
The storage medium is suitable for storing a plurality of instruction;
The method that described instruction is suitable for being loaded by the processor and executing page presentation as described above.
The electronic equipment that embodiment of the disclosure provides, can only write this in the page data of page requested and be asked Seek peculiar content of the page relative to other pages, and the shared content by the page requested relative to other pages, then it compiles It writes in the page layout template corresponding to the page requested, and it is substantial that page spy is additionally provided in page layout template Occupy-place label there is also defined page layout template information in page data, to when user asks to access the page, Ke Yigen Corresponding page layout template is read according to the page layout template information in page data, is then used defined in page data Peculiar content replaces the correspondence occupy-place label in page layout template, and replacing that treated, page layout template is asked as user The final page asked carries out rendering displaying.It follows that the peculiar content of current page is only programmed in by embodiment of the disclosure In page data, and the shared content of multiple pages is programmed in a page layout template, it is shared without repeating to write Content can only change the page to reduce page code redundancy, and when needing to change the integral layout of multiple pages Layout templates are individually changed without being directed to each page data, and then improve page layout modification efficiency.
Embodiment of the disclosure additionally provides a kind of computer program product, when executing on an electronic device, suitable for holding The program code of row initialization there are as below methods step:
Obtain the page data of page requested;
Page layout template information defined in the page data, reads the page corresponding to the page requested Face layout templates, the page layout template include the shared content of the page special substantial occupy-place label and multiple pages;
The page layout template is replaced using the peculiar content of the page requested defined in the page data In correspondence occupy-place label;
Treated that page layout template is rendered to replacing, to show the page requested.
It should be understood by those skilled in the art that, embodiment of the disclosure can be provided as method, system or computer program Product.Therefore, embodiment of the disclosure can be used complete hardware embodiment, complete software embodiment or combine software and hardware The form of the embodiment of aspect.Moreover, it wherein includes that computer is available that embodiment of the disclosure, which can be used in one or more, It is real in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code The form for the computer program product applied.
The application is with reference to method, the flow of equipment (system) and computer program product according to the embodiment of the present application Figure and/or block diagram describe.It should be understood that can be realized by computer program instructions every first-class in flowchart and/or the block diagram The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided Instruct the processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine so that the instruction executed by computer or the processor of other programmable data processing devices is generated for real The device for the function of being specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that instruction generation stored in the computer readable memory includes referring to Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device so that count Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, in computer or The instruction executed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/ Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable Jie The example of matter.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology realizes information storage.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic tape cassette, tape magnetic disk storage or other magnetic storage apparatus Or any other non-transmission medium, it can be used for storage and can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitorymedia), such as data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability Including so that process, method, commodity or equipment including a series of elements include not only those elements, but also wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including element There is also other identical elements in process, method, commodity or equipment.
It will be understood by those skilled in the art that embodiment of the disclosure can be provided as method, system or computer program product. Therefore, complete hardware embodiment, complete software embodiment or embodiment combining software and hardware aspects can be used in the application Form.Moreover, embodiment of the disclosure can be used in one or more wherein include computer usable program code calculating The computer program implemented in machine usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.
It these are only embodiments herein, be not intended to limit this application.To those skilled in the art, The application can have various modifications and variations.It is all within spirit herein and principle made by any modification, equivalent replacement, Improve etc., it should be included within the scope of claims hereof.

Claims (11)

1. a kind of method of page presentation, which is characterized in that the method includes:
Obtain the page data of page requested;
Page layout template information defined in the page data reads the page cloth corresponding to the page requested Office's template, the page layout template include the shared content of the page special substantial occupy-place label and multiple pages;
It is replaced in the page layout template using the peculiar content of the page requested defined in the page data Corresponding occupy-place label;
Treated that page layout template is rendered to replacing, to show the page requested.
2. according to the method described in claim 1, it is characterized in that, the page layout defined in the page data Template Information, reading the page layout template corresponding to the page requested includes:
Page layout template information defined in the page data obtains template store path;
By the template store path, the page layout template corresponding to the page requested is read.
3. according to the method described in claim 2, it is characterized in that, the page layout defined in the page data Template Information, obtaining template store path includes:
The page layout template mark defined in the page data is obtained, and searches the page cloth from the configuration file Template store path corresponding to office's template identification;
Alternatively, obtaining the template store path stored in the page data.
4. according to the method described in claim 1, it is characterized in that, the page data for obtaining page requested includes:
Overload resolution class and processing class;
The page data of the page requested is obtained by the processing class;
The page data of acquisition is initialised in the parsing class, so that the parsing class gets the page data.
5. wanting the method described in 4 according to right, which is characterized in that the parsing class includes:ViewResolver classes;The processing Class includes FreeMarkerView classes.
6. according to the method described in claim 1, it is characterized in that, page requested described in the page data it is peculiar in Appearance is defined in a manner of macro.
7. according to the method described in claim 6, it is characterized in that, page requested described in the page data it is peculiar in Appearance is defined in such a way that freemarker is macro.
8. method according to any one of claim 1 to 7, which is characterized in that the method further includes:
When in the page data without defining page layout template information, the page data is rendered, to show the quilt Accession page.
9. a kind of device of page presentation, which is characterized in that described device includes:
Acquiring unit, the page data for obtaining page requested;
Reading unit reads the page requested for the page layout template information defined in the page data Corresponding page layout template, the page layout template include being total to for the special substantial occupy-place label of the page and multiple pages There is content;
Replacement unit, for replacing the page using the peculiar content of the page requested defined in the page data Correspondence occupy-place label in layout templates;
Rendering unit, for treated that page layout template is rendered to replacing, to show the page requested.
10. a kind of storage medium, which is characterized in that the storage medium is stored with a plurality of instruction, described instruction be suitable for by The method that reason device loads and executes the page presentation as described in any one of claim 1-8.
11. a kind of electronic equipment, which is characterized in that the electronic equipment includes storage medium and processor;
The processor is adapted for carrying out each instruction;
The storage medium is suitable for storing a plurality of instruction;
Described instruction is suitable for being loaded by the processor and executing the side of the page presentation as described in any one of claim 1-8 Method.
CN201810157571.4A 2018-02-24 2018-02-24 The method and device of page presentation Pending CN108279903A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810157571.4A CN108279903A (en) 2018-02-24 2018-02-24 The method and device of page presentation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810157571.4A CN108279903A (en) 2018-02-24 2018-02-24 The method and device of page presentation

Publications (1)

Publication Number Publication Date
CN108279903A true CN108279903A (en) 2018-07-13

Family

ID=62808609

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810157571.4A Pending CN108279903A (en) 2018-02-24 2018-02-24 The method and device of page presentation

Country Status (1)

Country Link
CN (1) CN108279903A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109254773A (en) * 2018-09-19 2019-01-22 广州视源电子科技股份有限公司 Skeleton page generation method, device, equipment and storage medium
CN109753622A (en) * 2019-01-31 2019-05-14 天津字节跳动科技有限公司 static resource management method, device, storage medium and electronic equipment
CN110096276A (en) * 2019-03-16 2019-08-06 平安城市建设科技(深圳)有限公司 Source of houses displayed page configuration method, equipment, storage medium and device
CN110187878A (en) * 2019-05-29 2019-08-30 北京三快在线科技有限公司 A kind of page generation method and device
CN110968302A (en) * 2018-09-28 2020-04-07 北京嘀嘀无限科技发展有限公司 Front-end development method and device and electronic equipment
CN111090825A (en) * 2019-12-25 2020-05-01 北京商越网络科技有限公司 Dynamic customization method for webpage content
CN111190591A (en) * 2019-09-06 2020-05-22 腾讯科技(深圳)有限公司 Interface display method, data processing method, device, terminal and server
CN111367518A (en) * 2018-12-26 2020-07-03 北京奇虎科技有限公司 Page layout method and device, computing equipment and computer storage medium
WO2022142743A1 (en) * 2020-12-31 2022-07-07 京东科技控股股份有限公司 Visualized page rendering method, device, equipment, and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096694A (en) * 2009-08-23 2011-06-15 美国银行公司 Display rendering system with supporting components
CN102591654A (en) * 2011-12-28 2012-07-18 方正国际软件有限公司 Code generator based on SSH (secure shell) architecture and method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102096694A (en) * 2009-08-23 2011-06-15 美国银行公司 Display rendering system with supporting components
CN102591654A (en) * 2011-12-28 2012-07-18 方正国际软件有限公司 Code generator based on SSH (secure shell) architecture and method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
FESNG: ""Spring mvc整合freemarker详解"", 《HTTPS://BLOG.CSDN.NET/LPJISHU/ARTICLE/DETAILS/51902024》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109254773A (en) * 2018-09-19 2019-01-22 广州视源电子科技股份有限公司 Skeleton page generation method, device, equipment and storage medium
CN110968302A (en) * 2018-09-28 2020-04-07 北京嘀嘀无限科技发展有限公司 Front-end development method and device and electronic equipment
CN110968302B (en) * 2018-09-28 2024-01-05 北京嘀嘀无限科技发展有限公司 Front-end development method and device and electronic equipment
CN111367518A (en) * 2018-12-26 2020-07-03 北京奇虎科技有限公司 Page layout method and device, computing equipment and computer storage medium
CN111367518B (en) * 2018-12-26 2024-04-05 三六零科技集团有限公司 Page layout method, page layout device, computing equipment and computer storage medium
CN109753622A (en) * 2019-01-31 2019-05-14 天津字节跳动科技有限公司 static resource management method, device, storage medium and electronic equipment
CN110096276A (en) * 2019-03-16 2019-08-06 平安城市建设科技(深圳)有限公司 Source of houses displayed page configuration method, equipment, storage medium and device
CN110187878A (en) * 2019-05-29 2019-08-30 北京三快在线科技有限公司 A kind of page generation method and device
CN111190591A (en) * 2019-09-06 2020-05-22 腾讯科技(深圳)有限公司 Interface display method, data processing method, device, terminal and server
CN111190591B (en) * 2019-09-06 2022-02-01 腾讯科技(深圳)有限公司 Interface display method, data processing method, device, terminal and server
CN111090825A (en) * 2019-12-25 2020-05-01 北京商越网络科技有限公司 Dynamic customization method for webpage content
WO2022142743A1 (en) * 2020-12-31 2022-07-07 京东科技控股股份有限公司 Visualized page rendering method, device, equipment, and storage medium

Similar Documents

Publication Publication Date Title
CN108279903A (en) The method and device of page presentation
CN105574049A (en) Page processing method, device and system of mobile applications
CN108270629A (en) Site visitor&#39;s behavior monitoring method and device
US20130326333A1 (en) Mobile Content Management System
Su et al. An improved novel quantum image representation and its experimental test on IBM quantum experience
CN106575298A (en) Fast rendering of websites containing dynamic content and stale content
CN103502983A (en) Memoizing Web-browsing computation with DOM-based isomorphism
CN102637184A (en) Method and system for customizing webpages
CN108595681B (en) Method, device and system for displaying form
CN107451184A (en) Page display method and device, user equipment, storage medium
CN109857971A (en) Page rendering method and apparatus
US11205207B2 (en) Automated digital catalog generation
CN112417338B (en) Page adaptation method, system and equipment
CN111767499A (en) Page configuration method and device
Bernaschina et al. A big data analysis framework for model-based web user behavior analytics
CN109543092A (en) Financial product recommended method, device, storage medium and computer equipment
CN107391535A (en) The method and device of document is searched in document application
US11640440B2 (en) Automation system and method
CN103150355A (en) Web page content preview method and device, and equipment
CN110110184A (en) Information query method, system, computer system and storage medium
CN107704464A (en) Parse the method and device in the path of static resource
Pandit et al. Design of generic direct sparse linear system solver in C++ for power system analysis
US11507639B1 (en) Methods for identifying recurring web site accessibility issues and devices thereof
CN110020342A (en) The processing method and processing device of data
CN112579149B (en) Method, device, equipment and storage medium for generating model training program mirror image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20180713

RJ01 Rejection of invention patent application after publication