When learning node, I have some questions about jade. What kind of scenarios are templates like jade suitable for?

are jade and jsp the same thing?
what are the advantages of templates such as jade over vue,react? What kind of scenarios are suitable for?
is jade server rendering?


his real name opposes the answer upstairs. I don't know why he answered that. Nodding his head and reading the following doesn't seem to be a rookie.

  1. Jade has nothing to do with JSP. Jade is a template engine, and a template engine is the product of a certain stage of front-end development. When the current side needs to output complex pages for dynamic data, we will use the template engine as soon as possible. The template engine can dynamically insert the data into the written template and output complex pages, which is very suitable for the scene where the front and rear ends are separated.
  2. Vue, React called MVVM framework, the main feature is to achieve two-way binding between data and view, that is, developers only need to modify the data, the view will automatically change, saving a lot of development time. They have nothing to do with Jade, and they are aimed at different scenarios. Jade facilitates the generation of static pages, saves time writing pages, has obvious advantages where there are a large number of repetitive elements, and has nothing to do with the language, and its implementation can be found in mainstream languages. So we can use it in the HTML section of the .vue file, or we can share the code as a template in other languages.
  3. Jade can be rendered on the server side or compiled by the front end. But it is not what we often call "server-side rendering". Now we often say that server-side rendering, that is, Server Side Render,SSR, is mainly aimed at the MVVM framework. These frameworks are convenient for front-end and back-end separate development, but for search engines, they are not friendly enough; fortunately, we have Node.js, so we develop SSR tools, so that when users open the page, they can not only get the page frame, but also static HTML, which on the one hand can reduce the pressure on the browser, on the other hand can promote SEO. Almost every framework in this area has several independent implementations.

1Jade and Jsp are the same thing: templates for rendering web pages on the server;
2, the advantage is that when a website needs to do SEO, that is, SEO, it allows the crawler to climb to the complete HTML page, while through the front-end rendered pages such as Vue and React, the crawler initially grabs the HTML page with very little content, which is not friendly to the crawler. In addition, today, when more and more attention is paid to front-end performance, the disadvantage of back-end rendering will become more and more obvious. Except for interaction and visual performance, back-end rendering is not as good as front-end engineering. Back-end rendering focuses rendering pressure and network bandwidth on the server side, resulting in a shortage of resources.
3PowerJade is server-side rendering.

I hope I can help you.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b34aa0-2bf38.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b34aa0-2bf38.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?