有了解ractive.js这个框架的高手吗?
 发布于 11 年前  作者 sail1972  16871 次预览  最后一次回复是 11 年前  来自  

有了解ractive.js的高手吗?能否给我等小白科普下? 最近了解看过它的教程,觉得挺赞的,但中文资源几乎没有,所以想向了解它的高手讨教下。

谢谢!

8 回复
waksana

好厉害好厉害,看了下主页

HTML is an amazing language for creating static documents, but it was never designed for interactive web apps.

咦,这句话好像哪里看到过

在哪里呢?

哦,原来在这里

HTML is great for declaring static documents, but it falters when we try to use it for declaring dynamic views in web-applications.

ravenwang

HTML is a great declarative language for static documents. It does not contain much in the way of creating applications, and as a result building web applications is an exercise in what do I have to do to trick the browser into doing what I want?

jiyinyiyong

楼主说的是 Ractive 么… http://ractivejs.org

这个是对 DOM 使用双向绑定工具, 可以节省大量 DOM 操作的时间. 不过这个事情是 Angular 开始搞起来的, 技术叫做 MVVM, 更早可以追溯到 XAML 和 Flex. Ractive 特别的地方在于他是特化的, 专门做 DOM 双向绑定的模块, 而 MVVM 框架一般都有做应用统一的考虑, 比如数据模型, 路由等等.

我个人喜欢的是 Vuejs, 作者是在 Google 工作的国人, 他还写了中文教程, http://vuejs.org/ http://www.html-js.com/article/column/99 Vuejs 的功能和 Ractive 类似的, 但更清晰.

sail1972

正是!我把react.js和Ractive.js搞混了。 感谢你对Vue的介绍!

yakczh

就是onchange不用手写了,用统一的方法封装了一下,不过html标签要指定一个自定义的属性

sail1972

@jiyinyiyong 已经修改了。谢谢提醒。