Strong questions about the meaning of frameworks such as express,koa? Somebody help me!

1. As one of the most important concepts- router , template engine . (I understand that these two things are to give up the ajax set.) send the page directly to the browser. I think it is no different from the traditional jsp. As a person who has learned Vue,React , this is unacceptable to me.

2. Suppose you package the Vue project and put it into express, and still use ajax to request data. What"s the point of that?

3. It is indeed very convenient for them to combine mongoose to write interface , but I would like to ask, they are not previously similar to Spring service framework, is this really good, can it be applied in practice?

4.node as middleware ? My simple understanding is that the back-end does the service, sends the unprocessed data, and then renders it with the template engine after the front-end processing, which goes back to my first question.

which boss can answer my doubts in detail? I feel like I have fallen into the abyss of , please help me!

Mar.30,2021

    The router of
  1. express koa can not only return a segment of html or a segment of json, then it can be developed separately before and after.
    they can do either traditional mvc mode or express (interface) static (static file service) vue/react mode
  2. what you said about putting in an express is really pointless, and no one will do it.
    the most you can do is to build a wheel to turn on ssr
  3. .
  4. express koa is just a basic framework, not an enterprise framework, such as Ali egg and community thinkjs are based on koa's secondary
    development framework, which coincides with spring a lot. Mongodb enterprise applications may be less suitable for personal development or less stringent on the database
    projects such as an internal tool library
  5. .
  6. this node is used as middleware to say, for example, a page needs 10 requests to render, then node can do a middle tier. Please
    ask the server node agent to send the request java separately, then merge the 10 data, filter and optimize them and provide a request to the front end so that
    is more friendly to the front end
  7. .

you may not understand the architecture before and after separation and the application deployment server is a server static file server is a static server
normally requires the above three ends, of which the server and the static server may partially overlap. For example, express has a middleware called static that can provide static services

Menu