最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

when to use knockout javascript with ASP.NET MVC - Stack Overflow

programmeradmin2浏览0评论

What factors should I consider before adopting the Knockout JavaScript library for my application?

Currently I have a ASP.NET MVC 2 site. Most of the navigation and set up of the site is simple get and post actions. There are views which have grids / multiple grids where the data is view only. All the ajax and javascript is being handled using JQuery. JSON returned from Controllers are few and sparsely used. Most of the ajax grids are implemented by sending HTML using partial views.

What factors should I consider before adopting the Knockout JavaScript library for my application?

Currently I have a ASP.NET MVC 2 site. Most of the navigation and set up of the site is simple get and post actions. There are views which have grids / multiple grids where the data is view only. All the ajax and javascript is being handled using JQuery. JSON returned from Controllers are few and sparsely used. Most of the ajax grids are implemented by sending HTML using partial views.

Share Improve this question edited Dec 30, 2011 at 19:10 JC JC 12.1k11 gold badges44 silver badges63 bronze badges asked Jan 26, 2011 at 18:32 frictionlesspulleyfrictionlesspulley 12.4k15 gold badges72 silver badges122 bronze badges 0
Add a ment  | 

1 Answer 1

Reset to default 10

There are many factors but one thing which i've found very helpful:

When you have UI elements which are to be updated AND are sporadically distributed in your webpage e.g. When you want to add a new job experience, want to show the notification of successful addition on top of the page and increase the count somewhere on the right menu etc. If you use MVC ajax helpers then you would need to specify a single element which needs to be updated with ajax content or write your own huge jQuery.ajax thing. Knockout really simplifies this scenario.

发布评论

评论列表(0)

  1. 暂无评论