Is there any reason to use a Javascript framework in conjunction with ASP-MVC?

I am raising the speed for Javascript and I am starting to wonder if there is a goal to use a Javascript structure like Backbone / Knockout if I already use ASP.Net MVC on the server side.

Since I'm trying to create a one-page browser, I can understand why using the Javascript framework will be useful in general, but I'm starting to wonder if I can create a better experience by simply relying on AJAX Server Connections to update the parts of the page that I want to update. I assume, in general, what is the purpose of the Javascript framework?

+6
source share
3 answers

Despite the fact that there are many supporters of using Backbone and Knockout with MVC (Scott Guthrie was one of them with his spa project), I find that this is too much for my projects.

Lately, I am pretty dependent on JavaScript dependency management with Require.Js. This speeds up the download, helps me modulate my code, and provides some convenient cleanup. However, in the end, it is up to you how much client-side overhead you need.

As an aside, you can consider AngularJS as an alternative to Backbone / Knockout.

+2
source

Firstly, I would say that currently most users expect dynamic experiences, as well as flexible interfaces (responsive in terms of speed, not a responsive buzzword). To achieve this, using JavaScript is usually the way to go. Usually you save yourself traveling to the server, which takes time and bandwidth.

As for using the JavaScript framework and choosing which one to use, it really will depend on the type of application you plan to build. For example, Backbone is great for structuring your application, while Knockout is great for interacting with the user. There are many more variables that go into it, although there are many blog posts that compare and contrast different structures.

It will be difficult for you to get a truly interactive and dynamic web application without using JavaScript these days. The various frameworks, we hope, will help you achieve your desired functions.

+1
source

Javascript frameworks facilitate the interactivity of the SPA and the rich client side through greater implementation than server-side. The Knockout workhorse is the ability to update real-time DOM when models change, so you don’t need to move around and change the DOM yourself. This is a tool. If you need it for your project, then by all means give it a chance, it is probably worth the learning curve and learning javascript in an object-oriented way. If not, then you are wasting precious time for a loafer by creating client and server models.

+1
source

Source: https://habr.com/ru/post/946126/


All Articles