Cycle.js v6.0.0 Nested 发布,人机交互 JS 框架

jopen 8年前

Cycle Nested 是个全新的 Cycle.js 版本,主要关注硬核的复用:任意 Cycle.js 应用都可以很容易在更大的 Cycle.js 应用中复用。

Cycle.js Nested 包括:

新特性:

  • Cycle.js 应用组件简化  (比如 main() 重命名为 Button()),可以在大型 Cycle.js 应用中复用

  • Cycle DOM 引入 hyperscript helpers,可以创建 virtual DOM

下载:https://github.com/cyclejs/cycle-core/archive/v6.0.0.zip

命名变化:

Before After
DOM.get() DOM.select().events()
Response (naming convention) Source (naming convention)
Request (naming convention) Sink (naming convention)
Cycle DOM mockDOMResponse() Cycle DOM mockDOMSource()
labeledSlider (custom element) LabeledSlider (dataflow component)
let [sinks, sources] = Cycle.run(m, d) let {sinks, sources} = Cycle.run(m, d)

Cycle.js 是一个人机交互的 JavaScript 框架。Cycle 的核心是由 human() 和 computer () 两个函数相互作用而建立的模型。计算机的输出作为人体的输入,反之亦然,然后导出方程 x = human(computer(x)),这个 x 是可以观察的。人机相互观察,这就是我们说的“功能单项数据流”,或者“反应对话”,作为一个应用程序的开发者,你只要指定 computer() 的功能。

来自:http://www.oschina.net/news/69251/cycle-js-6-0-0-nested