Front-end template implementation method and device

An implementation method and template technology, applied in the field of network applications, can solve the problems of increased cost and high maintenance cost of front-end templates, and achieve the effect of reducing development cost, improving development efficiency and good portability.

Active Publication Date: 2015-03-25
TENCENT TECH (SHENZHEN) CO LTD
View PDF1 Cites 22 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Based on this, it is necessary to provide a low-cost front-end template implementation method for the existing fro

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Front-end template implementation method and device
  • Front-end template implementation method and device
  • Front-end template implementation method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0048] In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.

[0049] Such as figure 1 Shown is a flow chart of a method for implementing a front-end template in an embodiment. The implementation method of the front-end template can be applied to the page update of the browser on the terminal. The terminal can be a smart phone, a personal computer, a personal digital assistant, a tablet, etc. The implementation method of the front-end template includes:

[0050] Step 102, obtain the variable to be replaced in the pre-defined front-end template, the variable includes the variable between the pre-defined start identifier and the end identifier.

[0051] Firs...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention relates to a front-end template implementation method and device. The method includes: acquiring predefined variables needing replacement in a front-end template, wherein the variables include predefined variables between a start identifier and an ending identifier; replacing the variables with specified content in a data source, and merging all the replaced content; rendering the front-end template with the content merged to generate a hypertext markup language text; converting the hypertext markup language text into DOM nodes, and inserting the DOM nodes into a web page. By the front-end template implementation method and device, the variables in the front-end template are replaced with the specified content of the data source, and the hypertext markup language text is generated by rendering and then converted into the DOM nodes which can be directly inserted into the web page without depending on a third-party library, so that development cost is lowered, transferability is good, DOM operation of the HTML (hypertext markup language) text generated based on rendering is supported, and development efficiency is improved.

Description

technical field [0001] The invention relates to network application technology, in particular to a method and device for realizing a front-end template. Background technique [0002] In the early web development, the browser requested the page, and the background directly returned the HTML (Hyper Text Markup Language, hypertext markup language) page. The page that the user sees is the page returned by the background, that is, while the background is responsible for the business logic processing, it is also responsible for the specific rendering of the front page, that is, the generation of an HTML page. [0003] With the rise of the OPA (One Page Application) concept represented by gmail, the complexity of Web front-end development has further increased. Web pages originally only needed simple visual presentation, but now they need to undertake more tasks such as user interaction processing and frequent The view updates. The original way of directly returning to the final ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F9/44G06F17/30
Inventor 陈映平龙丁奋郭学亨李晶郑旭泽
Owner TENCENT TECH (SHENZHEN) CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products