I have worked with JQuery + JSonResult and Knockout.js. For simple views you'll be fine with just JQuery + JSonResult but for complex views with lot of interaction the Knockout.js will help a lot.
Here you can find a sample of how to perform cascading on dropdownlists
using Knockout.js
Please click 'Mark as Answer' if my reply has assisted you
"And whoever is removed away from the Fire and admitted to Paradise, he indeed is successful." (The Holy Quran)
Excellent Windows VPS Hosting Imran Baloch MVP, MVB, MCP, MCTS, MCPD
I created a simple framework that it helps you to build a mvc ajax application with knockout.js / MVVM pattern. Javascript to IQueryable is a library that allows you to write a simple query in javascript client side and then execute it server side with EntityFramework
or a linq provider that implement IQueryable. On the server is used "Dynamic Expressions and Queries in LINQ by Microsoft" to compose dynamically your query. There is also support for knockout.js, so you can use in your pages the MVVM pattern. In this way
you can create a MVC jquery knockout.js grid with filter, paging and sort functions. There is also support for mvc3 unobtrusive jquery validation (it will be used some custom mvc htmlhelper). There is also support for jquery mobile, so you can create a datasource
for a jquery mobile apps.
If you are going to use knockout js. give a look to Mvc Controls Toolkit
Client Blocks. They are built on top of knockout js, and add to it, Mvc validation, globalization, strong typed byndings, you can bing model properties also to complex javascript widgets. Finally, bindings are defined automatically based on the same name
convention used by the default model binder, and the client viewmodel side is automatically serialized and sent to the client...and on post deserialize and put in the right place within the server side ViewModel. You can write knockout powered views as normal
razor views forgetting about bindings and client model handling...everything is handled auomatically by the framework...You have just to add the client side javascrit SPECIFIC for your application all "Hard Plumbing" is handled automatically.
shapper
Contributor
3932 Points
3789 Posts
Ajax in MVC. JQuery, Backbone, Knockout, ... ?
Aug 23, 2011 12:33 PM|LINK
Hello,
I have a MVC Application where I would like to implement some Ajax functionality.
For example, create a post, update a post, refresh a list and sort it, add an item, etc.
I think this can be done using:
- JQuery + JSonResult
- Backbone.js
- Knockout.js
What is, in our opinion, the best solution for MVC 3?
I have been looking in all this options and even others but I can't decide which one to choose.
And will MVC 4 include something to make this easier?
Thank You,
Miguel
raduenuca
All-Star
24675 Points
4250 Posts
Re: Ajax in MVC. JQuery, Backbone, Knockout, ... ?
Aug 23, 2011 12:48 PM|LINK
I have worked with JQuery + JSonResult and Knockout.js. For simple views you'll be fine with just JQuery + JSonResult but for complex views with lot of interaction the Knockout.js will help a lot.
Here you can find a sample of how to perform cascading on dropdownlists using Knockout.js
Radu Enuca | Blog
imran_ku07
All-Star
45785 Points
7698 Posts
MVP
Re: Ajax in MVC. JQuery, Backbone, Knockout, ... ?
Aug 25, 2011 06:17 AM|LINK
Also see the formar ASP.NET MVC team member post.
http://wekeroad.com/post/8704830356/the-backbonejs-and-knockout-danceoff
Excellent Windows VPS Hosting
Imran Baloch MVP, MVB, MCP, MCTS, MCPD
lovedota21
Member
411 Points
190 Posts
Re: Ajax in MVC. JQuery, Backbone, Knockout, ... ?
Aug 25, 2011 06:28 AM|LINK
Knockout & Mvc is better, I am using them to handle JSON, You can do everything with Knockout Drag & Drop, Ajax Paging...
Try it !
shapper
Contributor
3932 Points
3789 Posts
Re: Ajax in MVC. JQuery, Backbone, Knockout, ... ?
Aug 25, 2011 03:22 PM|LINK
I am going to try it.
Thank You!
Miguel
mastefano196...
Member
2 Points
1 Post
Re: Ajax in MVC. JQuery, Backbone, Knockout, ... ?
Feb 24, 2012 05:31 PM|LINK
I created a simple framework that it helps you to build a mvc ajax application with knockout.js / MVVM pattern. Javascript to IQueryable is a library that allows you to write a simple query in javascript client side and then execute it server side with EntityFramework or a linq provider that implement IQueryable. On the server is used "Dynamic Expressions and Queries in LINQ by Microsoft" to compose dynamically your query. There is also support for knockout.js, so you can use in your pages the MVVM pattern. In this way you can create a MVC jquery knockout.js grid with filter, paging and sort functions. There is also support for mvc3 unobtrusive jquery validation (it will be used some custom mvc htmlhelper). There is also support for jquery mobile, so you can create a datasource for a jquery mobile apps.
http://javascriptiqueryable.codeplex.com/
francesco ab...
All-Star
20888 Points
3277 Posts
Re: Ajax in MVC. JQuery, Backbone, Knockout, ... ?
Feb 25, 2012 12:32 PM|LINK
If you are going to use knockout js. give a look to Mvc Controls Toolkit Client Blocks. They are built on top of knockout js, and add to it, Mvc validation, globalization, strong typed byndings, you can bing model properties also to complex javascript widgets. Finally, bindings are defined automatically based on the same name convention used by the default model binder, and the client viewmodel side is automatically serialized and sent to the client...and on post deserialize and put in the right place within the server side ViewModel. You can write knockout powered views as normal razor views forgetting about bindings and client model handling...everything is handled auomatically by the framework...You have just to add the client side javascrit SPECIFIC for your application all "Hard Plumbing" is handled automatically.
Mvc Controls Toolkit | Data Moving Plug-in Videos