当前位置:SEARU.ORG > Linux 软件 > 正文

Node.js 的 Web 框架 BigPipe

BigPipe 是一个比较激进的 Node.js 的 Web 框架。其思路是使用多个可重用的网页部件来组合整个网页。这些部件称为 Pagelets ,然后通过在服务器和浏览器上进行不同的执行方法来组合。这使得前端页面可以按进度进行内容的渲染,提升了前端的速度。

Most web frameworks are based on a request and response pattern, a request comes
in, we process the data and output a template. But before we can output the
template we have to wait until all data has been received in order for the
template to be processed. This doesn’t make any sense for Node.js applications
where everything is done asynchronously. When receiving your first batch
of data, why not send it directly to the browser so it can start downloading the
required CSS, JavaScript and render it.

未经允许不得转载:SEARU.ORG » Node.js 的 Web 框架 BigPipe

赞 (0)
分享到:更多 ()

评论 0