0

I've been using MVC for over a year now, and I like it alot. I've heard of Knockout.js. How is the comparison between these two? Which is better?

MVC seems to have reached its maturity with MVC5, with alot of support.

I do not see knockout.js as well supported. There examples on their site do not even work in Firefox. However, I can see the potential of this since it is written in javascript, client-side, and possibly faster since its client-side, like ajax.

What are the advantages of Model-view-controller vs Model-View-View-Controller?

tereško
  • 58,060
  • 25
  • 98
  • 150
user1929393
  • 4,089
  • 7
  • 30
  • 48
  • possible duplicate of [What is the difference between MVC and MVVM?](http://stackoverflow.com/questions/667781/what-is-the-difference-between-mvc-and-mvvm) – David d C e Freitas Jan 23 '14 at 01:02

2 Answers2

2

You should not be comparing Knockout.js to Asp.NET MVC. The only similarities are that they both use the same Model-View-Controller pattern.

Knockout.js:

Knockout is a standalone JavaScript implementation of the Model-View-ViewModel pattern with templates. The underlying principles are therefore:

a clear separation between domain data, view components and data to be displayed the presence of a clearly defined layer of specialized code to manage the relationships between the view components The latter leverages the native event management features of the JavaScript language.

Asp.NET MVC:

ASP.NET MVC allows you to build a web application as a composition of three roles: Model, View and Controller.

A model represents the state of a particular aspect of the application. A controller handles interactions and updates the model to reflect a change in state of the application, and then passes information to the view. A view accepts necessary information from the controller and renders a user interface to display that information.

As you can see Knockout.js is an MVC implementation for JavaScript while Asp.Net MVC is an MVC implementation for a complete web application from front end to server. These technologies can even (and very often) be used together to build well structured applications on both the front end and the back end.

Jason Roell
  • 6,679
  • 4
  • 21
  • 28
0

You are comparing apples and oranges...

Since you are now familiar with ASP.Net MVC (and the MVC design pattern in general), it is time to take the next step and use a JavaScript MVC framework WITH it.

There are many choices, some popular ones include Knockout.js, AngularJS, Backbone.js, Ember.js, and many more. The site TodoMVC will give you a flavor of what is out there.

ThisGuy
  • 2,335
  • 1
  • 28
  • 34