Artwork

Content provided by AsyncTalk. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by AsyncTalk or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.
Player FM - Podcast App
Go offline with the Player FM app!

EP29 装上 Zod 没有 Bug

13:18
 
Share
 

Manage episode 379190208 series 3291831
Content provided by AsyncTalk. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by AsyncTalk or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.

Shownotes

本期节目主要介绍了运行时的校验以及它的一个实现 —— Zod.

在越来越大的项目中,运行时校验是逃不开的一个环节,可以应用在表单校验,API 返回值校验和后端的参数校验中。

如果你的项目多人协作但是还没有接入类似的功能,可以考虑加一下,降低一些 bug 率

如果对节目有任何意见或者建议,欢迎联系 async.talk@gmail.com


名词解释


Runtime: 运行时,运行中的情况

CI: 持续集成,简而言之,build & test 放到独立的服务器去做

Lint: 代码校验,规范协作情况下代码统一


主播

AnnatarHe: https://annatarhe.com


Timeline

00:20 最近意识到 zod 蛮有趣的

00:50 大型项目协作的问题

02:30 Runtime 检查的必要性

03:20 Zod 的优势

04:30 应用场景 —— 表单校验

06:10 应用场景 —— API 校验

07:50 应用场景 —— 后端 HTTP 参数校验

09:10 Zod 实用小技巧 —— Infer

09:50 Zod 实用小技巧 —— Don't Trust, Verify

11:10 Zod 的竞争者们 —— Joi, Yup

12:20 总结: 用起来呀~


相关链接

Zod: https://zod.dev/

Zodios: https://www.zodios.org/

Sentry: https://sentry.io/welcome/

Joi: https://github.com/hapijs/joi

Yup: https://github.com/jquense/yup


扩展阅读

2 hidden ways to get more from your Gmail address: https://gmail.googleblog.com/2008/03/2-hidden-ways-to-get-more-from-your.html

Don't Trust, Verify: 很久之前看的文章,找不到了,请自行搜索。

Zod 对比: https://zod.dev/?id=comparison


BGM by Otologic

  continue reading

45 episodes

Artwork
iconShare
 
Manage episode 379190208 series 3291831
Content provided by AsyncTalk. All podcast content including episodes, graphics, and podcast descriptions are uploaded and provided directly by AsyncTalk or their podcast platform partner. If you believe someone is using your copyrighted work without your permission, you can follow the process outlined here https://player.fm/legal.

Shownotes

本期节目主要介绍了运行时的校验以及它的一个实现 —— Zod.

在越来越大的项目中,运行时校验是逃不开的一个环节,可以应用在表单校验,API 返回值校验和后端的参数校验中。

如果你的项目多人协作但是还没有接入类似的功能,可以考虑加一下,降低一些 bug 率

如果对节目有任何意见或者建议,欢迎联系 async.talk@gmail.com


名词解释


Runtime: 运行时,运行中的情况

CI: 持续集成,简而言之,build & test 放到独立的服务器去做

Lint: 代码校验,规范协作情况下代码统一


主播

AnnatarHe: https://annatarhe.com


Timeline

00:20 最近意识到 zod 蛮有趣的

00:50 大型项目协作的问题

02:30 Runtime 检查的必要性

03:20 Zod 的优势

04:30 应用场景 —— 表单校验

06:10 应用场景 —— API 校验

07:50 应用场景 —— 后端 HTTP 参数校验

09:10 Zod 实用小技巧 —— Infer

09:50 Zod 实用小技巧 —— Don't Trust, Verify

11:10 Zod 的竞争者们 —— Joi, Yup

12:20 总结: 用起来呀~


相关链接

Zod: https://zod.dev/

Zodios: https://www.zodios.org/

Sentry: https://sentry.io/welcome/

Joi: https://github.com/hapijs/joi

Yup: https://github.com/jquense/yup


扩展阅读

2 hidden ways to get more from your Gmail address: https://gmail.googleblog.com/2008/03/2-hidden-ways-to-get-more-from-your.html

Don't Trust, Verify: 很久之前看的文章,找不到了,请自行搜索。

Zod 对比: https://zod.dev/?id=comparison


BGM by Otologic

  continue reading

45 episodes

All episodes

×
 
Loading …

Welcome to Player FM!

Player FM is scanning the web for high-quality podcasts for you to enjoy right now. It's the best podcast app and works on Android, iPhone, and the web. Signup to sync subscriptions across devices.

 

Quick Reference Guide