奇舞周刊第 435 期:函数式编程 (FP)

记得点击文章末尾的“ 阅读原‍文 ”查看哟~

下面先一起看下本期周刊 摘要 吧~

奇舞推荐

■ ■ ■

 函数式编程 (FP)

函数式编程 (functional programing) 虽说并没有成为企业主流的编程范式,却以写法灵活、语义纯粹的特点让众多开发者爱不释手。本文对函数式编程的主要概念进行了讲解,希望更多的开发者能了解这种有趣的编程思想。

 协同文档工作机制简介

随着在线办公的兴起,传统办公套件 Office 的在线化需求也随之增加。钉钉文档作为钉钉核心办公套件之一,上线已经三年,其间持续迭代,已成为一个极其复杂的产品。对前端工程师而言,协同文档是一个较为有挑战的领域,除了传统天坑富文本编辑器外,还引入了协同编辑这一挑战,钉钉文档甚至还支持专业排版能力。来自钉钉的前端技术专家本杰,就在第十六届 D2 前端技术论坛进行了分享,本次分享以钉钉文档为例,简述协同文档的工作机制。

 HTTP 缓存协议实战

缓存,又称作 Cache,不管对于前端还是后端,都是优化性能的一把利器。本文介绍了 HTTP 协议中的缓存控制,并辨析了几个难以分辨的概念。

技术实践

■ ■ ■

 一种开发 Chrome 扩展程序的新姿势

我们在日常工作和生活中经常会使用到各种各样的 Chrome 扩展程序,比如 1Password 能自动帮你填充密码,Adblock 能帮你拦截广告,又或者是开发时经常会使用的 React Developer Tools,Redux DevTools 等等。这些扩展程序对效率的提升是巨大的。在日常开发过程中,我们也可以尝试开发自己的扩展程序,来辅助提升团队的开发体验和效率。本文首先会展示一个实际开发扩展程序的例子,从而让读者体会到当前开发时存在的问题,并基于此提出解决方案。

 浏览器的 5 种 Observer,你用过几种?

网页开发中我们经常要处理用户交互,我们会用 addEventListener 添加事件监听器来监听各种用户操作,比如 click、mousedown、mousemove、input 等,这些都是由用户直接触发的事件。那么对于一些不是由用户直接触发的事件呢?比如元素从不可见到可见、元素大小的改变、元素的属性和子节点的修改等,这类事件如何监听呢?浏览器提供了 5 种 Observer 来监听这些变动:MutationObserver、IntersectionObserver、PerformanceObserver、ResizeObserver、ReportingObserver。

 React hooks 状态管理方案解析

React v16.8 之后,Function Component 成为主流,React 状态管理的方案也发生巨大的转变。Hooks 诞生之后,代码优雅简洁变成一种趋势。开发者也倾向于用一种小而美、学习成本低的方案来实现状态管理。本文将从实现“计数器”这个经典场景出发,逐步分析 Hooks 时代下,React 状态管理方案的演进过程和背后的实现原理。

拓展边界

■ ■ ■

 WebAssembly 2021 年回顾与 2022 年展望

未来可期

 Wasm 玩出花?在浏览器中运行虚拟机!

传统意义上的虚拟机 (VM) 是一种创建于物理硬件系统 (位于外部或内部)、充当虚拟计算机系统的虚拟环境,它模拟出了自己的整套硬件,包括 CPU、内存、网络接口和存储器,但它依然需要运行在一个服务器上。而 WebVM 和我们平时看到的传统的 WebShell 完全不一样,它的 WebVM 是没有服务器的,它单纯依赖于 HTML5/WebAssembly 就可以独自在浏览器客户端中运行一个基于 Debian 的完整虚拟机。

07a0152df46182f6dc8e8b074e82bf64.png

关于奇舞团

奇舞团是 360 集团最大的大前端团队,代表集团参与 W3C 和 ECMA 会员(TC39)工作。奇舞团非常重视人才培养,有工程师、讲师、翻译官、业务接口人、团队 Leader 等多种发展方向供员工选择,并辅以提供相应的技术力、专业力、通用力、领导力等培训课程。奇舞团以开放和求贤的心态欢迎各种优秀人才关注和加入奇舞团。

9b7aa012054038c3612841d295256b3c.png 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Explore functional programming and discover new ways of thinking about code. You know you need to master functional programming, but learning one functional language is only the start. In this book, through articles drawn from PragPub magazine and articles written specifically for this book, you'll explore functional thinking and functional style and idioms across languages. Led by expert guides, you'll discover the distinct strengths and approaches of Clojure, Elixir, Haskell, Scala, and Swift and learn which best suits your needs. Contributing authors: Rich Hickey, Stuart Halloway, Aaron Bedra, Michael Bevilacqua-Linn, Venkat Subramaniam, Paul Callaghan, Jose Valim, Dave Thomas, Natasha Murashev, Tony Hillerson, Josh Chisholm, and Bruce Tate. Functional programming is on the rise because it lets you write simpler, cleaner code, and its emphasis on immutability makes it ideal for maximizing the benefits of multiple cores and distributed solutions. So far nobody's invented the perfect functional language - each has its unique strengths. In Functional Programming: A PragPub Anthology, you'll investigate the philosophies, tools, and idioms of five different functional programming languages. See how Swift, the development language for iOS, encourages you to build highly scalable apps using functional techniques like map and reduce. Discover how Scala allows you to transition gently but deeply into functional programming without losing the benefits of the JVM, while with Lisp-based Clojure, you can plunge fully into the functional style. Learn about advanced functional concepts in Haskell, a pure functional language making powerful use of the type system with type inference and type classes. And see how functional programming is becoming more elegant and friendly with Elixir, a new functional language built on the powerful Erlang base.The industry has been embracing functional programming more and more, driven by the need for concurrency and parallelism. This collection of articles will lead you to mastering the functional approach to problem solving. So put on your explorer's hat and prepare to be surprised. The goal of exploration is always discovery. What You Need: Familiarity with one or more programming languages.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值