Date post: | 14-May-2015 |
Category: |
Documents |
Upload: | sampetruda |
View: | 729 times |
Download: | 1 times |
mix06MICROSOFTI TEHNOLOOGIAÕHTU
koolituur
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.
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
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
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>
DEMO
UpdatePanel
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)
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" />
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
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
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
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
Demo
Enriching an existing Application
This would have been it for an overview
but then I found the WPF/E
announcement
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
Thank you
• Presentation and demo will be available at
http://blogs.msn.com/mariobriana
• Further information at
www.asp.net
ajax.asp.net