Need advice about which tool to choose?Ask the StackShare community!

Angular

1.7K
4.7K
+ 1
499
Knockout

251
200
+ 1
6
Add tool

Angular 2 vs KnockoutJS: What are the differences?

  1. Component-Based Architecture: Angular 2 uses a component-based architecture where an application is divided into reusable and independent components, making it easier to manage and scale the application. On the other hand, KnockoutJS follows a MVVM (Model-View-ViewModel) design pattern, which separates the UI from the underlying data and logic but does not enforce a strict component-based structure.

  2. Two-Way Data Binding: Angular 2 provides two-way data binding by default, allowing changes in the model to reflect automatically in the view and vice versa. In contrast, KnockoutJS offers automatic UI updates when the data model changes, but users need to manually handle input changes for two-way binding.

  3. TypeScript Support: Angular 2 is written in TypeScript, which is a superset of JavaScript that adds static typing and other advanced features. TypeScript enhances code maintainability, scalability, and developer productivity. KnockoutJS, on the other hand, primarily uses plain JavaScript with optional TypeScript support.

  4. Routing: Angular 2 has an integrated routing system that provides more advanced routing capabilities out of the box, making it easier to manage multiple views and navigation within a single-page application. KnockoutJS, in comparison, lacks built-in routing and requires additional libraries or manual implementation to achieve similar routing functionalities.

  5. Tooling and Ecosystem: Angular 2 has a more extensive tooling ecosystem with powerful CLI (Command Line Interface) tools, IDE support, and a large community contributing to libraries and resources. KnockoutJS, while having a supportive community, may not offer the same breadth of tools and resources as Angular 2.

  6. Performance: Angular 2 is built with performance optimization in mind, leveraging features like ahead-of-time compilation and tree shaking to reduce bundle sizes and improve application efficiency. KnockoutJS, although efficient for smaller applications, may face performance challenges when handling complex or data-intensive scenarios due to its architecture.

In Summary, Angular 2 emphasizes a component-based architecture, provides robust two-way data binding, TypeScript support, integrated routing, a rich tooling ecosystem, and optimized performance compared to KnockoutJS.

Decisions about Angular and Knockout
Dennis Ziolkowski
Migrated
from
AngularJSAngularJS
to
AngularAngular

I was first sceptical about using Angular over AngularJS. That's because AngularJS was so easy to integrate in existing websites. But building apps from scratch with Angular is so much easier. Of course, you have to build and boilerplate them first, but after that - you save a ton of time. Also it's very cozy to write code in TypeScript.

See more
Julius alvarado

It is a complete waste of time and life to learn a different framework to solve the same problem (Both AngularJS and Angular build A+ UI's, but both require a lot of time to learn). It's dumb to spend 200 hours learning AngularJS, then 200 hours learning Angular when you could spend 200 hours learning AngularJS and 200 hours learning how to solve a different problem (like AI/ML, Data Science, AR/VR, Digital Marketing, etc.)

See more
Kyle Harrison
Web Application Developer at Fortinet · | 2 upvotes · 48.3K views

When deciding on a front end framework to build my bitcoin faucet project, I knew I needed something battle hardened, dependedable, but also feature filled and ready to go out of the box.

While I've written some smaller apps with ng2+, I've never gone full tilt with it so I knew there were still some things to learn, and most importantly: how to do them properly, such as proper component architecture and breaking old habbits from ng1.

I didn't opt for React in this case, simply due to the need to stack more and more things on top of it to do what I'd need it to do. I wanted a framework that was going to take over routing and execution of complex UI controls, and keep items outside of a component's scope updated and react to events. This framework needed a comprehensive event emission system, data acquisition and handling, bi-directional data binding, state, and a series of things that you'd need to install separately for React to match up to what's already in the box with Angular.

I opted to stick to Angular instead of Vue for the fact that Angular also already has it's entire build system ready to go and comprehensivly built to deliver the tiniest version of it's deliverable. I was hosting this thing in a google cloud instance, so I needed to make sure the app stayed as small as possible, and could automatically trim out the cruft. This is where Angular's built in Tree Shaking took precedence for me.

Vue is more than capable of handling everything I'd need, and it was something I took serious considerion of. For instance, Vue poweres Cointiply, another bitcoin faucet application that's highly reactive and high componentized just like I wanted.

But I'd still need to learn Vue, I'd still need to configure it's build system, and I still wanted to use SCSS and TypeScript.

So Angular it was. ng8 is a great platform for building very complex user interfaces, and has many of the problems you'd inevitably face integrating a user interface to an application already figured out, and complete with a best practice recommendation.

React and Vue, given enough time and energy, are super capable platforms. No one can deny that. Angular's "A-Z Batteries Included" approach to the whole development process is what made it especially enticing this time.

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Angular
Pros of Knockout
  • 109
    It's a powerful framework
  • 53
    Straight-forward architecture
  • 48
    TypeScript
  • 45
    Great UI and Business Logic separation
  • 40
    Powerful, maintainable, fast
  • 39
    Amazing CLI
  • 33
    Great mvc
  • 29
    Powerfull Dependency Injection
  • 19
    Easy to build
  • 16
    All in one Framework
  • 15
    Opinionated, batteries-included approach
  • 11
    Schematics
  • 10
    Solid Standard Setup.
  • 8
    Structured
  • 7
    Performance
  • 5
    Complex
  • 4
    Only for single page applications
  • 3
    Builders
  • 2
    RxJS
  • 2
    Ng upgrade
  • 1
    React
  • 3
    Data centered application
  • 2
    Great for validations
  • 1
    Open source

Sign up to add or upvote prosMake informed product decisions

Cons of Angular
Cons of Knockout
  • 9
    Overcomplicated
  • 9
    Large overhead in file size and initialization time
  • 2
    Ugly code
  • 2
    CLI not open to other test and linting tools
    Be the first to leave a con

    Sign up to add or upvote consMake informed product decisions

    What is Angular?

    It is a TypeScript-based open-source web application framework. It is a development platform for building mobile and desktop web applications.

    What is Knockout?

    It is a JavaScript library that helps you to create rich, responsive display and editor user interfaces with a clean underlying data model. Any time you have sections of UI that update dynamically (e.g., changing depending on the user’s actions or when an external data source changes), it can help you implement it more simply and maintainably.

    Need advice about which tool to choose?Ask the StackShare community!

    Jobs that mention Angular and Knockout as a desired skillset
    What companies use Angular?
    What companies use Knockout?
    See which teams inside your own company are using Angular or Knockout.
    Sign up for StackShare EnterpriseLearn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Angular?
    What tools integrate with Knockout?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    What are some alternatives to Angular and Knockout?
    React
    Lots of people use React as the V in MVC. Since React makes no assumptions about the rest of your technology stack, it's easy to try it out on a small feature in an existing project.
    Polymer
    Polymer is a new type of library for the web, designed to leverage the existing browser infrastructure to provide the encapsulation and extendability currently only available in JS libraries. Polymer is based on a set of future technologies, including Shadow DOM, Custom Elements and Model Driven Views. Currently these technologies are implemented as polyfills or shims, but as browsers adopt these features natively, the platform code that drives Polymer evacipates, leaving only the value-adds.
    Aurelia
    Aurelia is a next generation JavaScript client framework that leverages simple conventions to empower your creativity.
    Vue.js
    It is a library for building interactive web interfaces. It provides data-reactive components with a simple and flexible API.
    Meteor
    A Meteor application is a mix of JavaScript that runs inside a client web browser, JavaScript that runs on the Meteor server inside a Node.js container, and all the supporting HTML fragments, CSS rules, and static assets.
    See all alternatives