Concept of static page and dynamic page in web development. (+ ejs, Jade template)

Asked 2 years ago, Updated 2 years ago, 166 views

Hello.

Web development with node.js.

I asked you this question because I had doubts during the development.

So far, we've been developing all the files in .ejs.

However, when I tried to apply reactjs, it seemed that ejs grammar <%=%> and reactjs grammar were not applied at the same time. (Although we haven't studied this part deeply yet.)

(I think it's not because I can't apply correction+reactjs, but because I covered up the rendering Anyway~)

Here's the question mark. Can't we just develop it into HTML? Why use ejs?

Come to think of it, ejs seems to be an advantage when managing dynamic pages, but dynamic pages and static pages in practice are

I don't have a clue how to distinguish and what the situation is.

Please give me your opinion on these issues.

Thank you.

node.js template html5

2022-09-22 15:21

1 Answers

ejs is a template. The server puts the data in HTML and renders it

Simply put, you need a template engine like ejs to put data from DB and elsewhere into HTML and render it

If you simply render HTML, there's no way to get data from the server. Of course, you can use client templates such as doT.js or Handlebars.js

So I need something like ejs to send data and HTML That's what I mean

In addition to ejs, there are many template engines such as swig and Jade, so I recommend these if they overlap


2022-09-22 15:21

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.