search

Home  >  Q&A  >  body text

javascript - Separation of front and back, node as the middle layer problem.

It is now very popular to develop front-end and back-end separation. When searching on the Internet, some of them use nodejs to request other back-end apis and then render the page, that is, node is used as the middle layer. Another method is a pure html page, and all interfaces use ajax to asynchronously request data. Isn't the latter more convenient? Why use node as the middle layer?

曾经蜡笔没有小新曾经蜡笔没有小新2817 days ago707

reply all(2)I'll reply

  • 代言

    代言2017-06-28 09:29:22

    You can take a look at my previous answer

    /q/10...

    The use of the template engine is to reduce requests and to separate the front and back ends, so in this way, the three-tier architecture is suitable for large applications

    reply
    0
  • 大家讲道理

    大家讲道理2017-06-28 09:29:22

    The back-end interface is business-driven and does not customize the interface according to the front-end page. When the front-end engineer writes the code, the data that can be requested through one interface often requires multiple interfaces to piece together the data

    reply
    0
  • Cancelreply