Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking for a way to control large amounts of JavaScript code in a ASP.Net MVC web application.

I have been looking at Ember.js and whilst it's pretty compelling it takes control of the routing and as such treats the server as little more than a place from which to receive API calls. This isn't really useful for what I need.

I wondered if there recommendations for similar projects out there that allow faster, more structured, JavaScript but in traditional server-based web applications?

share|improve this question
up vote 1 down vote accepted

Take a look at knockout.js it is an MVVM library.Like most frameworks it does not have any routing.Rather it has a concept of observables.What this means is it can observe any DOM elements for changes and once detected it updates the UI automatically.This can take care of most of the DOM interaction that we do in single page applications like showing/hiding certain parts of UI based on user actions.

For me knockout.js has the cleanest syntax in javascript frameworks.All the bindings are done through html 5 data* attributes.

You might also want to check out this excellent article that compares the most popular javascript mvc frameworks.If you already have written lots of client side code and are considering migrating to knockout.js check out this question that I asked on stack overflow.The answer really helped me in finding an effective way to do this.

share|improve this answer
Angular can be used both with custom attributes or data-... attributes: – Niphra Apr 26 '13 at 13:09
Ahh that's nice I did not know that. – Akshat Jiwan Sharma Apr 26 '13 at 13:32
Excellent answer, exactly what I was looking for. Cheers! – Damien Apr 27 '13 at 10:35

There are a whole bunch of various JavaScript frameworks.

You can find exemples of applications in there:

And a nice comparison here:

I personnally like Angular as it's more powerful then Knockout and lighter than Ember.

share|improve this answer
Doesn't Angular want to take control of routing though? – Damien Apr 29 '13 at 20:13

You can disable Ember's URL management. Read the guide before you discard Ember. What's considered a structured web application on client-side is moving forward in a rapid and pleasant manner (i.e. Ember). That fact does also make Niphra's suggested article from Smashing Magazine outdated if you are evaluating Ember.

But Ember might still not be way to go for structuring large amounts of existing JavaScript code. Someone else might fill in on that subject.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.