Follow the latest thinking from people working at the cutting edge of innovation and have your say on everything from economic policy to robot overlords.
by Tayyab
Posted on
Knockout 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), Knockout can help you implement it more simply and maintainable.
Angular JS is a new, powerful, client-side technology that provides a way of accomplishing really powerful things in a way that embraces and extends HTML, CSS and JavaScript, while shoring up some of its glaring deficiencies. It is what HTML would have been, had it been built for dynamic content.
Data-binding is probably the coolest and most useful feature in AngularJS. It will save you from writing a considerable amount of boilerplate code. A typical web application may contain up to 80% of its code base, dedicated to traversing, manipulating, and listening to the DOM. Data-binding makes this code disappear, so you can focus on your application.
In AngularJS, a template is just plain-old-HTML. The HTML vocabulary is extended, to contain instructions on how the model should be projected into the view.
The HTML templates are parsed by the browser into the DOM. The DOM then becomes the input to the AngularJS compiler. AngularJS traverses the DOM template for rendering instructions, which are called directives. Collectively, the directives are responsible for setting up the data-binding for your application view.
AngularJS incorporates the basic principles behind the original MVC software design pattern into how it builds client-side web applications.
The MVC or Model-View-Controller pattern means a lot of different things to different people. AngularJS does not implement MVC in the traditional sense, but rather something closer to MVVM (Model-View-ViewModel).
AngularJS has a built-in dependency injection subsystem that helps the developer by making the application easier to develop, understand, and test.
Dependency Injection (DI) allows you to ask for your dependencies, rather than having to go look for them or make them yourself. Think of it as a way of saying “Hey I need X’, and the DI is responsible for creating and providing it for you.
Directives can be used to create custom HTML tags that serve as new, custom widgets. They can also be used to “decorate” elements with behavior and manipulate DOM attributes in interesting ways.
Detail | AngularJS | KnockoutJS |
---|---|---|
Description | Toolset for building the framework most suited to your application development | Simplify dynamic JavaScript UIs by applying the Model-View-View Model (MVVM) |
Tag | Javascript | Javascript |
Extension/Plug-in | Yes | Yes |
Template language | Html5 | Html5/Any you want |
Adobe Flash Support | No | Yes |
Multi tasking | Yes | No |
RESTful | Conditional | Yes |
Jquery Support | Yes | Yes |
Object-Relational Mapping (ORM) | Yes | No |
Client/Server code reuse | Model-View-Controller(Web services) | Model-View-Controller |
Browser support | Internet Explorer9+.Firefox.Chrome.Opera. | Chrome.Firefox.Internet Explorer.Maxthon(browser).Opera.Safari |
Real Time | Yes | Yes |
Websocket Support | Yes | Yes |