jQuery templates and data link

14
jQuery Templates and data binding Now and in the future Matt Milner Instructor and consultant
  • date post

    21-Oct-2014
  • Category

    Technology

  • view

    1.175
  • download

    0

description

More info on http://www.techdays.be

Transcript of jQuery templates and data link

Page 1: jQuery templates and data link

jQuery Templates and data bindingNow and in the future

MattMilnerInstructor and consultant

Page 2: jQuery templates and data link

Session Contents• jQuery Templates• Data-Link• jsRender and jsViews• Combining binding and templates• Futures

Page 3: jQuery templates and data link

Microsoft and jQuery

Ajax client library + jQuery’s meteoric rise to popularity• Shift in focus

MS contributes to jQuery• Templates• data-link• Globalization

Page 4: jQuery templates and data link

jQuery TemplatesjQuery PluginAvailable on MS CDNDownload from jquery.com

Client-side template engineSupport for collections or single objectsConditional evaluation

Available in beta . . . butjQuery team has stopped work on this line of codeSee jsRender

Simplify rich user interface creation

Markup focused templates for javaScript

Page 5: jQuery templates and data link

Available template tags

${} – an expression or field

{{if}} and {{else}} – conditional output

{{each}} – iterate over array elements

{{tmpl}} – invoke another template

{{html}} – use literal (aka unencoded) HTML data

{{wrap}} – wrap another template which includes HTML

Page 6: jQuery templates and data link

jQuery Data-LinkjQuery PluginAvailable on MS CDNDownload from jquery.com

Client-side databinding“Binds” javaScript objects to form inputs“Bind” javaScript object to another object

Available in beta . . . butjQuery team has stopped work on this line of codeSee jsViews

Simplify object editing

Html and JavaScript binding

Page 7: jQuery templates and data link

jsRenderString-based client templatesExtremely fastNo jQuery dependencyAvailable on GitHub

Available in beta soonjQuery team currently planning on using for templating

Simplify rich user interface creation

Markup focused templates for javaScript

Page 8: jQuery templates and data link

jsRender template tags

{{= }} – an expression or field

{{= !} – unencoded output (e.g. html){{if}} and {{else}} – conditional output{{each}} – iterate over array elements

Page 9: jQuery templates and data link

jsViewsClient-side databindingDeclarative binding syntax

<input type=“text” data-from=“[Description]” data-to=“[Description]” />Available on GitHub

Available in beta soonjQuery team contemplating using

Simplify model focused development on the client

HTML and JavaScript databinding

Page 10: jQuery templates and data link

Session Summary• jQuery Templates and Data-link in use now• Declarative templates and data-binding for the

client • jsRender and jsViews have betas coming shortly

Page 11: jQuery templates and data link

Calls to action• Get started with templates and linking today• Watch jsRender and jsViews for advancement• Check out knockoutjs or other frameworks for MVVM

Page 12: jQuery templates and data link

Q&A

Page 13: jQuery templates and data link

Be what’s next• Find everything here

http://aka.ms/mbl-tech• Visual Studio Developer Preview Downloads

http://aka.ms/mbl-tech/devprev• MSDN HTML5 Developer Center

http://aka.ms/mbl-tech/html5

Page 14: jQuery templates and data link

© 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.