Knockout.js 和 Rx.js 有什么区别?
有谁知道 RxJs 和 < a href="http://knockoutjs.com/" rel="noreferrer">淘汰赛?对我来说,表面上他们似乎在试图解决同样的问题,构建一个事件驱动的 UI。但是对于两者都有过经验的人来说,它们有何不同/有何相似之处?你能描述一下他们的一些情况来帮助我选择吗?
Does anyone know the differences between RxJs and Knockout? To me on the surface they seem to be trying to solve the same problem, to build an event driven UI. But someone who has had experience with both, how do they differ/ how are they similar? Can you describe something about them to help me choose?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Steve(Knockout 的创建者)在他的博客上解释了差异:
Steve (the creator of Knockout) explained the difference on his blog:
它们实际上是完全不同的框架,但我可以理解为什么您会看到交叉:
RxJs 提供了一种针对异步流(如事件和 Web 请求)组合操作的方法,并包括高级场景(如组合流) (当 A 和 B 都发生时,启动它,但如果 A 或 B 再次发生则取消它)
Knockout 是一个 MVVM 框架,允许您通过映射用户界面的模型来管理用户界面的状态功能。这允许您的视图逻辑与您的视图分离。
They're actually quite different frameworks, though I can see why you'd see crossover:
RxJs provides a means of composing operations against asynchronous streams, like events and web requests, and includes advanced scenarios like combining streams (when both A and B occur, start this, but cancel it if A or B occur again)
Knockout is an MVVM framework that allows you to manage the state of your user interface via a model that maps it's functionality. This allows your view's logic to be separated from your view.