开发者

MVC3 Razor and Knockout in VS 2010? [closed]

开发者 https://www.devze.com 2023-02-26 19:10 出处:网络
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citat开发者_如何学运维
Closed. This question is opinion-based. It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citat开发者_如何学运维ions by editing this post.

Closed 9 years ago.

Improve this question

I'm now diving into MVC3 with VS 2010 and looking at a few front-end frameworks. It looks like Razor is the standard for front-end integration, but I'm not too familiar with how something like KnockoutJS fits into this. My impression is that it is a data container that gives us observable collection functionality on the Web - not having to develop in Silverlight, for example, to make use of this functionality.

Looking at the Mix11 Video presentation of KnockoutJS, I'm once again guessing, that based on the jQuery integration capability, that we could simply replace jQuery with any other front-end library, such as Razor.

Is there any plan on integrating this into VS?


Razor is a back-end technology which works at the server side to render your HTML pages.

KnockoutJS on the other end is a pure client-side technology for UI-binding.

How they fit together? At the server side you do all your business logic etc. and get's some data to display it to the user. Now how this data will be transported to user and displayed in HTML is something improvised through Razor. It helps you to incorporated dynamic data in your HTML pages. This also includes saving information in Javascript variables incase they are required at the client-side.

Once the HTML page + all Javascript is sent to the client side, the page is rendered by the browser and the Javascript kicks in to improve page's usability and interaction. Here KnockoutJs (which is essentially Javascript) comes into play and you could use it improve the usability of your pages through binding HTML elements to Javascript variables. At this stage, Razor has no role what so ever to play.

I hope this makes sense.

0

精彩评论

暂无评论...
验证码 换一张
取 消