Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.Net MVC 4 and JavaScript frameworks with - AJAX and Unobtrusive validation

In asp.net MVC (not WebAPI), we can make asynchronous requests to controller using AJAX and jQuery. I have made bunch of functions to call the controllers where required. For Validation, we can take the advantage of DataAnnotation validation of Model and use unobtrusive validation.

But on seeing the recent javascript frameworks like, backbone, knockout and many other,

Is there any best way to use these frameworks for the asp.net MVC application.

I inspired using of Javascript architectures here, which is wonderful introduction to ASP.NET MVC SPAs.

I also read alot of blogs about backbone usage and knockout observables (MVVM), but cant find the way to stick them all together. The advantages would be ease of maintaining javascript.

I have seen the Todomvc application (selecting MV*), and can see the best use of model, but not validations and ajax.

On concluding, What is the best way to use the existing JavaScript frameworks in ASP.NET MVC4 application (not WebAPI) for AJAX, unobtrusive validation ?

like image 815
stak Avatar asked Feb 04 '26 22:02

stak


1 Answers

Take a look at this Microsoft article ASP.Net Single Package Application and make your choice depending on what you want.

I think that Breeze/Knockout template is the best choice for the simple and small or medium size applications - it is the fastest and easiest way for ASP.Net MVC integration.

But for the large (reach) applications the Breeze/Angular or DurandalJS templates would be better choice.

like image 51
VAV Avatar answered Feb 06 '26 12:02

VAV



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!