目前用的是express+ejs输出页面,页面中只用了JQuery这样的工具,并没有用任何框架,一来是因为不知道需不需要,二来也不知到像是AngularJS emberJS 这样的框架如何与express+ejs这种模式接轨。
请问使用nodejs进行后端渲染输出web时,前端还需要框架级的JS工具吗?
PS:不知道ejs中是否能使用react?效果如何?
大家讲道理2017-04-17 11:53:07
If it is a single-page app, it is recommended to use a framework
It seems that teambition uses angular js, so every time there is a huge loading, you have to wait
怪我咯2017-04-17 11:53:07
Depending on the demand, it is not necessarily necessary to use it, but it is now popular to separate the front and back ends. The front end is responsible for routing and template output, and the back end is responsible for data processing. They are transmitted through Json (refer to Restful API). You can go to the scotch.io website to see Look, there are many cases of using front-end frameworks combined with back-end
怪我咯2017-04-17 11:53:07
Wonder why my answer was ignored.
You can use react
To use react, you need some js skills. In addition, react is very powerful. When you use its full technology stack, you will slowly feel it.