angularjs - Angular JS 比 Knockout JS 有何优势,或者我应该更喜欢 Angular JS 还是 Knockout JS?

标签 angularjs knockout.js

  • 哪一个易于使用?
  • 两者的偏好特征是什么?
  • 两者的使用百分比是多少?
  • 在使用两者或任何一个之前我们应该了解什么?

最佳答案

这取决于您的需要。

For data driven app. Choose Angular. With it's nice data binding

<小时/>

The fundamental difference between the two solutions is that AngularJS manages the whole application and defines guidelines on how the application code should be structured, whereas with KnockoutJS the application structure is entirely up to you.

<小时/>

Knockout has a low barrier of entry, but is also harder to manage when code base and complexity grows. It is not easy to build the necessary infrastructure correctly, and poor decisions made in structuring code may cost a lot to fix in the future.

<小时/>

Angular’s ability to bind directly to plain objects, modular structure, and strict development guidelines prevent many issues right from the start, and provide a strong architectural foundation for the application.

<小时/>

Knockout is primarily used to control UI representation in lower complexity applications, whereas Angular is a JavaScript framework that is much better suited for large, complex enterprise applications. It provides not only UI binding, but also best practices for application structure, development and testing.

<小时/>

还添加了一些内容:

  1. Knockout 就像轻量级 Angular
  2. Knockout 没有路由,Angular 有。但如果你想 在 Knockout 中使用路由,您可以使用 Sammy.js/小型 Web 框架 使用类/RESTFul 事件 JavaScript
  3. Knockout 和 Angular 具有自动数据绑定(bind)
  4. Knockout 在 .net 开发中很流行,而 Angular 也有后盾 by Google Angular 有服务、指令,Knockout 没有

引用文献:

https://www.devbridge.com/articles/angular-vs-knockout-similarities-and-fundamental-differences/

https://www.codementor.io/reactjs/tutorial/reactjs-vs-angular-js-performance-comparison-knockout

Angular.js vs Knockout.js vs Backbone.js

https://www.quora.com/How-do-Angular-js-and-Knockout-compare

关于angularjs - Angular JS 比 Knockout JS 有何优势,或者我应该更喜欢 Angular JS 还是 Knockout JS?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32837304/

相关文章:

javascript - Angular 部分不会将编辑传播到应用程序

javascript - 我的 Angular JS 应用程序可以在桌面浏览器中运行,但不能在移动浏览器中运行

javascript - promise : go to next error function

javascript - Knockout JS 多个按钮,每个按钮都有点击功能

javascript - 对数组进行排序而不重绘内容

javascript - 在 Click 函数中访问 'this'

knockout.js - KnockoutJS bindinghandler with childBindingContext - $data === $parent

javascript - knockout 和数据表

javascript - 访问子状态以过滤结果

html - 具有多个同名类的codeception CSS路径