Slide 1

17
mix06 MICROSOFTI TEHNOLOOGIAÕHTU koolituur

Transcript of Slide 1

Page 1: Slide 1

mix06MICROSOFTI TEHNOLOOGIAÕHTU

koolituur

Page 2: Slide 1

ASP.net AJAX

Mario Briana

[email protected]

Web Platform Architect Evangelist

Microsoft EMEA

Page 3: Slide 1

Asynchronous Java And XML

• ASP.net AJAX

– Used to be called Atlas

– Beta 2

– Available at www.asp.net

– Scheduled for release near year-

end

• Microsoft AJAX Library

– Beta 2

• ASP.net AJAX Control Toolkit

– CTP

– Joint Development between

Microsoft and the community

– Available at www.codeplex.com/AtlasControlToolkit

• ASP.net AJAX Futures

– CTP

– Bridge Technologies

• Microsoft AJAX Library

– contains the complete set

of client JavaScript

components that are

included in the full

ASP.NET AJAX Beta

– You may use and modify

these scripts in your own

applications.

Page 4: Slide 1

Enriching ASP.NET Applications

• Atlas-Enabling Pages– Add a ScriptManager control

• Enable Partial Rendering– Continue to use the postback model, but work out-of-band

– Only portions of the page are rendered on the server

– Existing page is updated using script

• Extend Existing Controls– Add rich client-side behavior to enable key scenarios

– AutoCompleteExtender, etc.

• Atlas Script Framework is an enabling technology– Control developers have a richer target to build for

– Page developers continue to use server controls

Enable key “AJAX” and user experience scenarios in an incremental manner while preserving the existing server controls and server-side development

models

Page 5: Slide 1

Server Or Client Centric?

• Server-centric web sites and apps

– Work with existing server application model

– Keep core UI/application logic on server

– Improve latency, interactivity, personalization

• Client-centric browser applications

– Fully exploit DHTML in presentation tier

• The DOM is back … never went away ;-)

– Use AJAX for data, services, composition

– Enable new immersive experiences

• ASP.net AJAX provides a great framework for both

Page 6: Slide 1

ASP.net AJAX Server Controls

Reducing full roundtrips

• <Atlas:UpdatePanel> control

– Easily define “updatable” regions of a page

– Server roundtrips become asynchronous

– ASP.net AJAX handles all the infrastructure

<ajax:UpdatePanel id=“u1” runat=“server”>

<ContentTemplate>

<!-- This content can be dynamically updated! ->

<asp:Calendar id=“cal1” runat=“server”/>

<ContentTemplate>

</ajax:UpdatePanel>

Page 7: Slide 1

DEMO

UpdatePanel

Page 8: Slide 1

Developing With ASP.net AJAX

Server-centric application model

ASP.NET

Application

Services

Page

Framework,

Server Controls

AJAX Script Framework

Client

Application

Services

Component/UI

Framework,

Controls

Browser

Presentation

(HTML/CSS)

Server Application

Pages

UI Behavior

(Managed

Code)

Input Data

Updated UI + Behavior

Initial Rendering

(UI + Behavior)

Page 9: Slide 1

ASP.net AJAX Server Controls

Adding interactivity

• ASP.net AJAX control extenders

– Extend ASP.NET controls with ASP.net AJAX behaviors

– Encapsulate both client and server behavior

– Same familiar programming model as ASP.NET server controls

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

<ajax:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server"

CompletionInterval="3" CompletionListElementID=""

TargetControlID="TextBox1" CompletionSetCount="3"

MinimumPrefixLength="1" ServicePath="NwindService.asmx"

ServiceMethod="GetCities" />

Page 10: Slide 1

Browser

Presentation

(HTML/CSS)

Ajax

Service

ProxiesUI Behavior

(Script)

ASP.NET

Application

Services

Page

Framework,

Server Controls

AJAX Script Framework

Client

Application

Services

Component/UI

Framework,

Controls

Server Application

Pages

UI Behavior

(Managed

Code)

Developing With ASP.net AJAX

Client-centric application model

Initial Rendering

(UI + Behavior)

Data

Data

Page 11: Slide 1

ASP.net AJAX Server Controls

Adding interactivity

• ASP.net AJAX client behaviors

– Reusable piece of interactive functionality

– Attach to HTML UI declaratively or in code

– Examples:

• Drag-and-drop

• Tooltips

• Popups

• Auto-complete

– Easily extend or write your own in Javascript

Page 12: Slide 1

ASP.net AJAX Script Framework

• Scenarios

– Mash-up and composite applications and sites

– Components and Gadgets (Live.com, Windows Sidebar)

• Powerful script framework

– Rich type system and class library for Javascript

– Component model and UI framework

– Rich client-side data access and databinding

• Easily integrated with server application model

– Easily consume web services from browser

– Script access to ASP.NET application services

– Server-side bridge to reuse 3rd party services

Page 13: Slide 1

ASP.net AJAX Script Framework

Networking

• A networking stack for asynchronous services

– High-level classes for requests/responses

– Customizable behavior – batching, prioritization, queuing

– Pluggable data format and wire protocol

• Uses JSON (JavaScript Object Notation) and REST by default

• Easy access to server-based services

– Easily call server-hosted web services

– ASP.net AJAX takes care of proxy generation, plumbing,

serialization

– Automatic serialization of .NET types to and from JavaScript

• Integrated with ASP.NET application services

– Authentication, authorization, session state, caching

Page 14: Slide 1

Demo

Enriching an existing Application

Page 15: Slide 1

This would have been it for an overview

but then I found the WPF/E

announcement

Page 16: Slide 1

Windows Presentation Foundation Everywhere

• What is it?

– cross-platform

– interactive experiences

– animation

– graphics

– audio

– video for the Web

• Access WPF with Script interact with AJAX

Page 17: Slide 1

Thank you

• Presentation and demo will be available at

http://blogs.msn.com/mariobriana

• Further information at

www.asp.net

ajax.asp.net