If you have used ASP. NET data binding control, also used in ASP or JSP that by outputting HTML elements to display data on the page, you will know ASP. NET data binding controls. If you can implement the same functions in the browser using HTML and JavaScript, what a wonderful thing is. The good news is that Microsoft has developed such a framework, which is an extension of jQuery, from then on, it will be as easy to dynamically display the data returned by the Web Service on the server side in the browser.
This technology is called jQuery templates and data linking, which is an extension of jQuery by Microsoft. This type of extension requires jQuery's official review before it can be included in jQuery. According to ScottGu's blog, this extension is awaiting review. However, these functions are very powerful and practical. I will turn them around first, and the first thing I can do is get fast.
When writing AJAX applications, JavaScript is often used to display Data on pages. jQuery Templates and Data Linking) it provides a convenient way to display JavaScript data on HTML pages. data can be displayed as various elements, such as plain text, TextBox, and list. The literal translation of the word "Data Linking" should be used as a Data link, but I think the word "Data Binding" can better reflect the ability of this technology and comply with ASP. NET usage. In Scott Guthrie's blog, they also wanted to call this technology data binding instead of data linking, but since jQuery already has the term binding, it refers to another thing. In order not to cause confusion, we have to give it another name, data linking.
I will transfer this blog here. If you have time, translate it.
The following full text is from ScottGu's blog.
JQuery Templates and Data Linking (and Microsoft contributing to jQuery)
The jQuery library has a passionate community of developers, and it is now the most widely used JavaScript library on the web today.
Two years ago I announced that Microsoft wowould begin offering product support for jQuery, and that we 'd be including it in new versions of Visual Studio going forward. by default, when you create new ASP. NET Web Forms and ASP. net mvc projects with VS 2010 you'll find jQuery automatically added to your project.
A few weeks ago during my second keynote at the MIX 2010 conference I announced that Microsoft wowould also begin contributing to the jQuery project. during the talk, john Resig -- the creator of the jQuery library and leader of the jQuery developer team-talked a little about our participation and discussed an early prototype of a new client templating API for jQuery.
In this blog post, I'm going to talk a little about how my team is starting to contriures to the jQuery project, and discuss some of the specific features that we are working on suchClient-side templatingAndData linking(Data-binding ).
Contributing to jQuery
JQuery has a fantastic developer community, and a very open way to propose suggestions and make contributions. Microsoft is following the same process to contribute to jQuery as any other member of the community.
As an example, when working with the jQuery community to improve support for templating to jQuery my team followed the following steps:
- We created a proposal for templating and posted the proposal to the jQuery developer forum (http://forum.jquery.com/topic/jquery-templates-proposal and http://forum.jquery.com/topic/templating-syntax ).
- After processing ing feedback on the forums, the jQuery team created a prototype for templating and posted the prototype at the Github code repository (http://github.com/jquery/jquery-tmpl ).
- We iterated on the prototype, creating a new fork on Github of the templating prototype, to suggest design improvements. Several other members of the community also provided design feedback by forking the templating code.
There has been an amazing amount of particle by the jQuery community in response to the original templating proposal (over 100 posts in the jQuery forum ), and the design of the templating proposal has evolved significantly based on community feedback.
The jQuery team is the ultimate determiner on what happens with the templating proposal-they might include it in jQuery core, or make it an official plugin, or reject it entirely. my team is excited to be able to participate in the open source process, and make suggestions and contributions the same way as any other member of the community.
JQuery Template Support
Client-side templates enable jQuery developers to easily generate and render html ui on the client. templates support a simple syntax that enables either developers or designers to declaratively specify the HTML they want to generate. developers can then programmatically invoke the templates on the client, and pass JavaScript objects to them to make the content rendered completely data driven. these JavaScript objects can optionally be based on data retrieved from a server.
Because the jQuery templating proposal is still evolving in response to community feedback, the final version might look very different than the version below. this blog post gives you a sense of how you can try out and use templating as it exists today (you can download the prototype by the jQuery core team at http://github.com/jquery/jquery-tmpl or the latest submission from my team at http://github.com/nje/jquery-tmpl ).
JQuery Client Templates
You createClient-sideJQuery templates by embedding content within