Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

精读《现代 JavaScript 概览》 #35

Closed
linhuiw opened this issue Sep 11, 2017 · 3 comments
Closed

精读《现代 JavaScript 概览》 #35

linhuiw opened this issue Sep 11, 2017 · 3 comments

Comments

@linhuiw
Copy link
Contributor

linhuiw commented Sep 11, 2017

精读文章地址:
https://auth0.com/blog/glossary-of-modern-javascript-concepts/
https://auth0.com/blog/glossary-of-modern-javascript-concepts-part-2/

讨论 Statefulness 与 Statelessness、Immutability 与 Mutability、Imperative 与 Declarative Programming、Higher-order Functions、Observables、以及 FP、RP、FPR 编程范式。如何应用到现在的开发里.

@ascoders
Copy link
Owner

ascoders commented Sep 13, 2017

这两篇文章介绍的很全面了,我对现代编程补充几条:

Dependent injection(依赖注入)

通过控制反转,父级不需要关心子实现细节,将子类可能用到的实例都初始化好,由子类决定引入哪些依赖。还有一个好处是维持了单实例,这一点在数据流中尤为重要,如果 store 不是单例的,那数据流必然乱了套,既希望传给子类使用,又要维持单例,依赖注入是很好的解决方案。

Symbol Reflect Proxy

这三篇文章非常详细介绍了这三位 API:symbol reflect proxy

Server rendering

前端对后端渲染的热度降了很多,主要是盲目跟风的氛围消停了,真正需要的团队已经稳定的用起来了。后端渲染的理念很新颖,一定程度帮助了 html 认识到自己的不足,就像 ag react vue 对
webComponents 的冲击一样,或许未来十年可以用上 ECMAScript 标准提供的功能,但业务不能等待技术,现在唯有不断折腾,直到被消灭或者招安。

@linhuiw
Copy link
Contributor Author

linhuiw commented Sep 16, 2017

文章讲了很多现代 JavaScript 编程中的很多新概念, 我这里记录一下所有的目录:

纯函数和副作用
Stateful 和 Stateless(有状态和无状态)
可变对象与不可变对象
Imperative and Declarative Programming(声明式和命令式编程)
高阶函数
函数式编程 FP
Hot and Cold Observables
响应式编程 RP
函数式响应型编程 FRP

作用域和闭包
单向数据流和双向数据流
JS框架中的变化侦测: 脏检查, getter 和 setter, 虚拟 DOM
Web Components组件
Smart 和 Dumb 组件
JIT 编译
AOT 编译
Tree Shaking

@linhuiw linhuiw closed this as completed Sep 16, 2017
@ascoders ascoders mentioned this issue Sep 16, 2017
65 tasks
@Line0o0
Copy link

Line0o0 commented May 6, 2022

"声明式代码去管理副作用和执行命令式编程" 这里是不是写反了,原文应该说的是 “命令式代码去管理副作用和执行声明式编程”

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants