Skip to Content
Node与Express开发(第2版)
book

Node与Express开发(第2版)

by Ethan Brown
June 2021
Intermediate to advanced
290 pages
9h 21m
Chinese
Posts & Telecom Press
Content preview from Node与Express开发(第2版)
4
|
第
1
章
前面提到
Express
是
Web
应用框架的“服务器端部分”,因此或许我们应该谈谈服务器端
应用和客户端应用之间的关系。
1.3
 服务器端应用和客户端应用
服务器端应用
就是应用中的页面都在服务器上生成(如
HTML
、
CSS
、图片和其他多媒体
资源,以及
JavaScript
)
,然后发送给客户端。而
客户端应用
的大部分用户界面是从一个资
源包渲染的,这个资源包只需要在最开始的时候接收一次。也就是说,一旦浏览器接收到
初始的
HTML
(通常也非常小)
,它就使用
JavaScript
来动态地修改
DOM
,不需要依靠服
务器来显示新页面(虽然原始数据通常还是来自服务器)。
在
1999
年之前
,服务器端应用是标准。事实上,
Web
应用
这个术语是在
1999
年正式引入
的。我认为大约
1999
年
到
2012
年这段时间是
Web 2.0
时代,在这个时期,最终成为客户
端应用的技术正在开发之中。到
2012
年
,随着智能手机的稳固发展,通过网络发送尽可
能少的信息成为一种普遍做法,这种做法更青睐客户端应用。
服务器端应用常常被称为
服务器端渲染
(
SSR
)应用
,客户端应用常常被称为
单页应用
(
S
PA
)。客户端应用完全在诸如
React
、
Angular
和
Vue
等框架中实现。我总是觉得“单页”
的叫法有点儿不妥,因为在用户看来显然有很多个页面。唯一的区别是,页面是服务器发
过来的还是在客户端动态渲染的。
在实际中,服务器端应用和客户端应用之间有很多模糊的界线。很多客户端应用有
2
个或
3
个
HTML
资源
包可以发给客户端(例如公开可见的界面和登录可见的界面
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

面向对象的思考过程(原书第5版)

面向对象的思考过程(原书第5版)

马特 魏斯费尔德
精通模块化JavaScript

精通模块化JavaScript

Nicolás Bevacqua

Publisher Resources

ISBN: 9787115565099