microsoft and jquery: a true love story - templating and other contributions

32
James Senior - Microsoft Web Evangelist @jsenior - www.jamessenior.com

Upload: jamessenior

Post on 19-May-2015

2.675 views

Category:

Technology


1 download

DESCRIPTION

How the Microsoft and jQuery relationship has evolved over time and how Microsoft are now contributing to the world's most popular javascript library, jQuery.

TRANSCRIPT

Page 1: Microsoft and jQuery: A true love story - templating and other contributions

James Senior - Microsoft Web Evangelist@jsenior - www.jamessenior.com

Page 2: Microsoft and jQuery: A true love story - templating and other contributions

Microsoft & jQuery: A True Love Story

Page 3: Microsoft and jQuery: A true love story - templating and other contributions

A few months ago…

Page 4: Microsoft and jQuery: A true love story - templating and other contributions
Page 5: Microsoft and jQuery: A true love story - templating and other contributions
Page 6: Microsoft and jQuery: A true love story - templating and other contributions

Once upon a time…1997: Classic ASP 1, 2, 32002: ASP.NET 1.0 and WebForms

Ajax Control Toolkit

2003 to 2007: ASP.NET 1.1, 2, 3, 3.52008: Visual Studio 2008 - including jQuery2008: Official Support for jQuery 2009: ASP.NET MVC – including jQuery2009: ASP.NET Ajax Library2009: jQuery on the Microsoft CDN2010: ASP.NET 4 – including jQuery

Page 7: Microsoft and jQuery: A true love story - templating and other contributions

VISUAL STUDIO 2010(NOW WITH BETTER JAVASCRIPT SUPPORT)

Demo-tastic

Page 8: Microsoft and jQuery: A true love story - templating and other contributions

Back in February, it was just another day at work

Page 9: Microsoft and jQuery: A true love story - templating and other contributions

ASP.NET Ajax Library• Open Source JavaScript Library• Cool features, including– Script Loader– Data-Linking– Observer class– Templating– Data Controls

• jQuery integration

Page 10: Microsoft and jQuery: A true love story - templating and other contributions

Perfect Match

Selectors Plugins Animation

jQuery ASP.NET AjaxTemplatingData-LinkingScript LoaderWCF OData.NET RIA

Page 11: Microsoft and jQuery: A true love story - templating and other contributions

First Date

Page 12: Microsoft and jQuery: A true love story - templating and other contributions

All good relationships…

ASP.NET Ajax Library

Cool Stuff

jQuery Plugins

Cool stuff

jQuery Core

Cool stuff ++

Proposal, Specification,Prototype

1. Have a clear contribution model2. Are open, transparent and collaborative3. Are in the spirit of jQuery community4. Have specification & Proposals on jQuery

Forums 5. Have prototypes as plugins in Github

jQuery Core Team

Page 13: Microsoft and jQuery: A true love story - templating and other contributions

jQuery Templating

• 1st contribution from Microsoft• Proposal, Spec and Prototype online– http://github.com/jquery/jquery-tmpl

Page 14: Microsoft and jQuery: A true love story - templating and other contributions

The Contribution model in action…

Page 15: Microsoft and jQuery: A true love story - templating and other contributions

What is Templating?

Data

Template

Templating Engine DOM

Page 16: Microsoft and jQuery: A true love story - templating and other contributions

Why client-side templates?

• Aren’t server side templates good enough?

• Couldn’t I do this before?

Page 17: Microsoft and jQuery: A true love story - templating and other contributions

What is a Template?

var tmpl = "<li>${ dataItem }</li>";

Page 18: Microsoft and jQuery: A true love story - templating and other contributions

What is a Template?

<script id=“myTemplate" type="text/html"><li>${ dataItem }</li>

</script>

Page 19: Microsoft and jQuery: A true love story - templating and other contributions

What is a Template?

<script id="productsTemplate" type="text/html"> <div> <img src="Content/ProductImages/${Picture}" class="productImage" /> <span class="productName">${Name}</span> Price: ${formatPrice(Price)} <img data-pk="${Id}" src="Content/AddCart.png" alt="Add to Cart" class="addCart" /> </div></script>

Page 20: Microsoft and jQuery: A true love story - templating and other contributions

.render()

$("#myTemplate").render( dataObject ).appendTo("ul");

<script id=“myTemplate" type="text/html"><li>${ dataItem }</li>

</script>

<ul><li>foo</li>

</ul>

Page 21: Microsoft and jQuery: A true love story - templating and other contributions

.render()

<script id=“myTemplate" type="text/html"><li>${ dataItem }</li>

</script>

$("#myTemplate").render( arrayOfDataObjects ).appendTo("ul");

<ul><li>foo_0</li><li>foo_1</li>

</ul>

Page 22: Microsoft and jQuery: A true love story - templating and other contributions

JQUERY TEMPLATINGCan I haz demo?

Page 23: Microsoft and jQuery: A true love story - templating and other contributions

And then there was more…

Page 24: Microsoft and jQuery: A true love story - templating and other contributions

jQuery Data Linking

Sync data and UI

Page 25: Microsoft and jQuery: A true love story - templating and other contributions

jQuery Data Linking

Golden Rule - modify data using jQuery

Page 26: Microsoft and jQuery: A true love story - templating and other contributions

DATA LINKINGDemo Fest

Page 27: Microsoft and jQuery: A true love story - templating and other contributions

Wait a minute…

What about the ASP.NET Ajax Library?– It’s now RTM quality code– Resides in Ajax Control Toolkit

(still an open source project)

– Still served on the CDN– We are not actively developing new

features

Page 28: Microsoft and jQuery: A true love story - templating and other contributions

This love story is to be continued…

Page 29: Microsoft and jQuery: A true love story - templating and other contributions

More Love: Web Camps Update

• Free, 2 day events – Learn and Build• 3000 people in 12 cities• More events being announced after

the summer• www.webcamps.ms

Page 30: Microsoft and jQuery: A true love story - templating and other contributions

How to find your love• Check out the proposals, specs and prototypes • Give your feedback to the community• Tell a friend about what you heard today• Get free tooling http://microsoft.com/web• Come along to a Web Camp

www.webcamps.ms• Slides and demos are on my blog…

Page 31: Microsoft and jQuery: A true love story - templating and other contributions

Contact Me

James SeniorMicrosoft Web Evangelist

@[email protected]

Page 32: Microsoft and jQuery: A true love story - templating and other contributions

Thank you!