Thursday, May 14, 2009

Taking AJAX to the Next Level – Jonathan Carter

www.lostintangent.com

What is the “next level?” 

Why do some find JavaScript painful?  - Intellisense and debugging

jQuery – write less, do more.

Three new AJAX Control Toolkit Controls – HTML Editor, Color Picker, and Combo Box added.  Released last night.  ACT will be getting much stronger

Very Important Point – AJAX supports the entire ASP .Net ecosystem and beyond.  This session will concentrate on the client side support.

Client Controls (coming in 4.0)

DataView (templated UI master/detail)

DataContext (Service communication)

 

Demo

<tbody 'id=”customers-template” class=”sys-template”>

<td> {{ Id }} </td>  - Client control mapping

 

jQuery stuff in *.js file

$(document).ready(function() {

var dataContext = $create(Sys.Data.DataContext, {

serviceUri: “Services/Customer.asmx”

});

var customersTemplate = $create(Sys.Ui.DataView,

{

autoFetch: true,

dataProvider: dataContext, fetchOperation: GETCustomers fetchParaneters: 20

}

, null, null, $get(“customers-template”))

});

 

Command Bubbling

<button sys:command=”select” … />

Live Bindings (one time, one way, and two way bindings between controls)

Demo on wiring up a master child relationship on adventure works database .  This is done entirely in html and jquery.  The point is that you can do AJAX purely on the client side.  I am not sure we would ever need this.  Possible impact would be to have another way to generate dynamic html in the client (see ExpenseTrack detail form).  Another possible application is easier way to refresh values in our pages without using Javascript.  I will try and follow up by downloading the example.

Change the service to DataService. 

No comments:

Post a Comment