Practical Node.js (2018版) 第8章:Building Node.js REST API Servers
Building Node.js REST API Servers with Express.js and Hapi
Modern-day web developers use an architecture consisting of a thick client and a a thin back-end layer。如AngularJS,ReactJs, VueJS。用来建立厚厚的client。
另一方面,他们使用REST APIs建立thin back-end layer。
a representational state transfer (REST) web application programing interface (API) service。
这种结构,被称为厚客户端或者SPA单页面程序,变得越来越流行。因为它们有以下优势:
- SPA更快,因为它们渲染网页元素在浏览器内,无需总是从服务器取HTML.
- bandwidth更小,因为一旦它加载,大多数的页面布局位置相同,所以浏览器只需使用JSON格式的数据来改变网页的元素。
- 相同的后端REST API可以服务多客户apps/consumers, web app是其中之一。
- 不理解
Practical Node.js (2018版) 第8章:Building Node.js REST API Servers的更多相关文章
- Practical Node.js (2018版) 第7章:Boosting Node.js and Mongoose
参考:博客 https://www.cnblogs.com/chentianwei/p/10268346.html 参考: mongoose官网(https://mongoosejs.com/docs ...
- Practical Node.js (2018版) 第5章:数据库 使用MongoDB和Mongoose,或者node.js的native驱动。
Persistence with MongoDB and Mongoose https://github.com/azat-co/practicalnode/blob/master/chapter5/ ...
- Practical Node.js (2018版) 第10章:Getting Node.js Apps Production Ready
Getting Node.js Apps Production Ready 部署程序需要知道的方面: Environment variables Express.js in production So ...
- Practical Node.js (2018版) 第9章: 使用WebSocket建立实时程序,原生的WebSocket使用介绍,Socket.IO的基本使用介绍。
Real-Time Apps with WebSocket, Socket.IO, and DerbyJS 实时程序的使用变得越来越广泛,如传统的交易,游戏,社交,开发工具DevOps tools, ...
- Practical Node.js (2018版) 第3章:测试/Mocha.js, Chai.js, Expect.js
TDD and BDD for Node.js with Mocha TDD测试驱动开发.自动测试代码. BDD: behavior-driven development行为驱动开发,基于TDD.一种 ...
- Practical Node.js (2018版) 第4章: 模版引擎
Template Engines: Pug and Handlebars 一个模版引擎是一个库或框架.它用一些rules/languages来解释data和渲染views. web app中,view ...
- Vue.js 学习笔记 第1章 初识Vue.js
本篇目录: 1.1 Vue.js 是什么 1.2 如何使用Vue.js 本章主要介绍与Vue.js有关的一些概念与技术,并帮助你了解它们背后相关的工作原理. 通过对本章的学习,即使从未接触过Vue.j ...
- Node入门教程(7)第五章:node 模块化(下) npm与yarn详解
Node的包管理器 JavaScript缺少包结构的定义,而CommonJS定义了一系列的规范.而NPM的出现则是为了在CommonJS规范的基础上,实现解决包的安装卸载,依赖管理,版本管理等问题. ...
- Node入门教程(6)第五章:node 模块化(上)模块化演进
node 模块化 JS 诞生的时候,仅仅是为了实现网页表单的本地校验和简单的 dom 操作处理.所以并没有模块化的规范设计. 项目小的时候,我们可以通过命名空间.局部作用域.自执行函数等手段实现变量不 ...
随机推荐
- Linux之cat的使用
基本介绍 工作原理 从标准输入读入要 cat 的文件列表,然后逐个打开,读入文件内容,再将内容输出到标准输出上. 使用场景 一次显示整个文件 从键盘创建一个文件 将几个文件合并为一个文件 将一个或多个 ...
- mybatis+oracle实现简单的模糊查询
第一种 concat select * from cat_table where cat_name like concat(#{catName},'%') --单个百分号 select * from ...
- python摸爬滚打之day18----instance, type, issubclass和反射
1.issubclass(a,b) ----> 判断a是否是b的子类. isinstance(a,b) ----> 判断a这个对象是否是b类型的(可以向上判断, 即考虑继承关系往父类 ...
- 列表 & 元组& join & range
一:列表(增删改查,列表的嵌套,列表的循环) 1)增加 append (在列表的尾部增加) insert (插入) insert(插入的位置,插入的内容) extend ...
- com.mysql.jdbc.Driver 与 org.gjt.mm.mysql.Driver的区别
com.mysql.jdbc.Driver的前身是org.gjt.mm.mysql.Driver,现在主要用com.mysql.jdbc.Driver,但为了保持兼容性保留了org.gjt.mm.my ...
- Java-idea-常用插件
一.插件安装 settings→plugins→直接搜索框搜索,没有选择Browse Respositories→找到需要安装的插件,install即可 二.常用插件 插件名称 简介 地址 备注 ...
- 012-mac下shell,zsh,oh-my-zsh,以及插件
1.查看当前shell echo $SHELL 2.查看安装的shell cat /etc/shells 查看可知 /bin/bash /bin/csh /bin/ksh /bin/sh /bin/t ...
- k-means性能测试
clf = MiniBatchKMeans(n_clusters=5000, batch_size=5000, n_init=1, max_iter=200, max_no_improvement=1 ...
- redis集群(jedis)批量删除同一前缀
public Set<String> getByPrefix(String key) { Set<String> setResult = new HashSet<> ...
- windows程序设计 基础
API全名(Application Program Interface) Windows窗口主函数 int WINAPI WinMain( HINSTANCE hInstance,//应用程序本次运行 ...
- Practical Node.js (2018版) 第7章:Boosting Node.js and Mongoose