Page template engine rendering method based on NodeJS

A page template and page technology, applied in the field of web page rendering, can solve the problems that SPA cannot be used as a general solution, the development method is too heavy, and the proportion is small, so as to improve development efficiency, facilitate collaboration, and improve the safety index.

Active Publication Date: 2018-01-09
LINEWELL SOFTWARE
View PDF3 Cites 7 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] 1. In WEB services, the proportion of SPA class is very small. In many scenarios, there are synchronous rendering or synchronous and asynchronous mixed modes. SPA cannot be used as a general solution;
[0006] 2. The Ajax-based SPA development model is more suitable for developing APP scenarios, but it is only suitable for APPs, because SEO and other issues are not easy to solve. For many types of systems, this development method is also too heavy

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
  • Page template engine rendering method based on NodeJS

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0020] Such as figure 1 As shown, the present invention discloses a NodeJS-based page template engine rendering method, which includes the following steps:

[0021] A NodeJS-based page template engine rendering method, comprising the following steps:

[0022] Step 1. Through the nginx configuration, the page request is forwarded to the NodeJS terminal that is listening to the corresponding port;

[0023] Step 2. Parse the URL, obtain the corresponding page name and the module it belongs to, and match the configuration of the page by reading the page configuration file combined with the module name, including the page name, whether filtering login is required, and whether synchronous rendering of the page template and data is required ; If the module does not exist or there is no such page under the module, then jump to the 404 page;

[0024] Step 3. If the page exists, determine whether it is necessary to filter the login. If the page needs to filter the login, then request ...

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 page template engine rendering method based on NodeJS. Under a separation framework of front and back ends, an artTemplate engine is introduced on the basis of adding a middle layer NodeJS and achieving some corresponding business logics, an access page path can be obtained in the middle layer, corresponding page elements are found, synchronization rendering display of server data is requested, the problem that synchronous rendering cannot be achieved in the SPA mode is solved, and the problem of SEO optimization is solved well.

Description

technical field [0001] The invention relates to a webpage rendering method, in particular to a NodeJS-based page template engine rendering method under the framework of separating front and rear ends. Background technique [0002] With the rise of different terminals (Pad / Mobile / PC), the requirements for developers are getting higher and higher. The pure browser-side responsiveness can no longer meet the high requirements of user experience. We often need to develop customized versions for different terminals. . In order to improve development efficiency, the need for front-end and back-end separation is getting more and more attention. The back-end is responsible for the business / data interface, and the front-end is responsible for the display / interaction logic. We can customize and develop multiple versions of the same data interface. [0003] But now everyone agrees that the commonly used example of front-end and back-end separation is SPA (Single-page application). All ...

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): G06F8/38
Inventor 蒋亮亮陈晓伟
Owner LINEWELL SOFTWARE
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