New booklet | Learn NestJS, front-end engineers can also write back-end projects

Site article cover image (1301x734).jpg

We know that an important reason why Node.js is popular all over the world is that front-end developers can use the same programming language to write front-end and back-end, and NestJS is the fastest growing framework in Node.js in recent years.

Why is NestJS getting more and more popular?

Conventional server-side frameworks such as Express and Koa are low-level. In essence, they do the most basic encapsulation for the HTTP bottom-level modules of Node.js, and provide a more convenient plug-in mechanism, allowing developers to customize their own modules freely. However, a higher degree of liberalization also means that developers have higher requirements for code development, architecture and design capabilities. At the same time, the degree of engineering is lower, because to use Koa and Express to complete a project, many third-party module integrations are required and even a plug-in needs to be written by yourself.

In contrast, NestJS is more engineered. NestJS is a framework for building efficient and scalable Node.js server-side applications, providing the ability to interface with multiple HTTP frameworks, combining OOP (Object Oriented Programming), FP (Functional Programming) and FRP ( It provides a series of out-of-the-box solutions for server-side project development, such as authentication, caching, database, security, and file processing .

As a result, more and more teams are using NestJS in large Node.js server-side projects.

However, as a framework for partial back-end development, NestJS's IoC-based development model is not friendly to front-end engineers. For example, the usage of a large number of decorators and reflection is not the same as the conventional JavaScript development model. This booklet was born.

How is the brochure designed?

In this booklet, CookieBoty will take you to learn and use NestJS together to build a gateway service system .

About the author(2100x389).jpg

Specifically, the booklet is divided into two modules.

基础学习模块:将通过搭建一套定制化的脚手架来学习 NestJS 框架的使用,了解 NestJS 常用的 API、插件等,熟悉 IoC 的开发模式。

项目实战模块:逐步完成用户系统、物料系统以及网关基础服务,完成网关服务系统体系的搭建,带你了解后端服务架构设计、数据库表设计与开发、微服务开发等后端知识体系。

image.png

一个完整网关系统的功能是非常大而全的,但是小册并不会实现全部的模块,而是挑选几个比较常见的模块来完成自研 Gateway 开发。这之后,你可以根据团队或者自己的需求,继续优化这个项目拓展需要的模块,达到理想可用的状态。

image.png

我们的网关系统架构可以分为以下几个模块。

首先是网关基础服务。 流量入口有 Nginx 做负载均衡,我们网关的基础服务专注于代理模块的开发:

  1. 专注于前后端资源分发以及不同类型的项目 API 分发;
  2. 常用资源缓存模块;
  3. AB Test 模块;
  4. 通用日志模块。

然后是统一的用户中心系统,包括用户登录、认证等基础功能和权限系统(基于 RBAC 包括角色、系统、资源等权限控制)。

最后是物料系统。 物料系统主要来管理静态资源,一般跟 DevOps 关联比较大,但我们的主题并不是 DevOps,所以物料系统只是作为一个辅助类型的项目为网关服务提供静态资源路由的配置、资源版本的管理等功能。

总的来说,小册将借助这个网关系统的搭建过程,尽可能模拟真实场景下项目开发流程,让前端工程师也能顺利实现服务端项目开发的从 0 到 1 。

上新特惠,限时 6 折

7 月 6 日 ~ 7 月 13 日,小册正值上新特惠,限时 6 折,仅需 ¥17.94

赶紧点击下方图片或者扫描海报二维码,一起加入学习吧!

Poster-Sister Brochure.jpeg

Guess you like

Origin juejin.im/post/7117179541054816287
Recommended