Front-end template processing method and device

A processing method and processing device technology, applied in the direction of program control devices, etc., can solve the problems of poor readability and maintainability, and achieve the effects of good readability and maintainability, reduced volume, and improved access speed

Active Publication Date: 2014-02-26
BEIJING QIHOO TECH CO LTD
View PDF6 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Embodiments of the present invention provide a front-end template processing method and device, which are used to solve the technical problem of poor readability and maintainability when using javascript for splicing in the prior art in the web development process, so as to achieve code readability Good technical effect and maintainability

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 processing method and device
  • Front-end template processing method and device
  • Front-end template processing method and device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0030] In order to enable those skilled in the art to understand the present invention in more detail, the present invention will be described in detail below in conjunction with the accompanying drawings.

[0031] Such as figure 1 said, figure 1 It is a processing method of a front-end template in an embodiment of the present invention, which is applied to the first code processing process of Html, wherein the method includes:

[0032] Step 10: Obtain the first code of the Html;

[0033] Specifically, step 10 is mainly to obtain the html code in Html, which is defined as the first code in the embodiment of the present invention. The acquisition of the first code can be obtained through an asynchronous interface. From the perspective of the embodiment of the present invention, those skilled in the art obtain the first code from Html in a conventional manner, which is within the scope of protection of this application, and this application will not describe in detail elabora...

Embodiment 3

[0064] A front-end template processing device is applied to the first code processing process of Html, wherein the device includes:

[0065] A first obtaining module 110, the first obtaining module 110 is used to obtain the first code of the Html;

[0066] A second obtaining module 120, the second obtaining module 120 is used to obtain the front-end template of the Html;

[0067] A first analysis module 130, configured to analyze the correspondence between the first code and the front-end template;

[0068] A converting module 140, configured to convert the first code into a second code according to the correspondence, wherein the first code is different from the second code.

[0069] Further, the device also includes:

[0070] A second analysis module, the second analysis module is used to analyze the front-end template of the Html;

[0071] A third obtaining module, the third obtaining module is configured to obtain the leading mark of the front-end template, so as to det...

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 discloses a front-end template processing method and device applied to the first code processing process of Html. The method includes: acquiring a first code of the Html; acquiring a front-end template of the Html; analyzing the corresponding relation between the first code and the front-end template; according to the corresponding relation, converting the first code into a second code which is different from the first code. The first code is converted into the second code through the corresponding relation between the first code and the front-end template of the Html, further the front-end template is utilized to separate the Html from Javascript, and accordingly the technical effect of good code readability and maintainability is achieved.

Description

technical field [0001] The invention relates to the technical field of computer processing, in particular to a processing method and device for a front-end template. Background technique [0002] With the continuous development of computer technology, there are more and more WEB development application scenarios, and as the page application becomes more and more complex, there are more and more places where Javascript is used in the page, and Javascript is often used to communicate with the back end , get the data, splice the returned data into the corresponding Html, and render it on the page. [0003] However, in the process of realizing the technical solution of the invention in the embodiment of the present application, the inventor of the present application was troubled by the following problems: [0004] Splicing in Javascript will be more troublesome, and the readability of the code is relatively poor, and the editor is not friendly to it. For example, in the prior...

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
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/44
Inventor 李成银
Owner BEIJING QIHOO TECH 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