Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Scott Isaacs
Architect
Windows Live Frameworks
Microsoft Corporation
Agenda
Rethinking Web Applications
"Remixing" on Windows Live
Gadgets, gadgets, gadgets!
What did we learn?
Component models
Network Management
More…
So What Is AJAX?
function DoAdd(strLoc)
{
Weather.Request(strLoc,onReceive)
}
Weather
Service
function onReceive(obWeatherData)
{
ProcessWeather(objWeatherData)
}
AJAX – The Details
Describes a simple development pattern
Asynchronously request data from the server
Process the Result
Update the Page
Technology has been around for many years
.Live_Weather {margin:2px}
.Live_Weather input (width:50%;
Renders
…
Live Clipboard Demo
A “Clipboard” for the Web
Enables copying microformats between web pages and
applications
Extending Existing Content
Automatically bind behavior via CSS to elements (e.g.,
microformats) on your page
Our future approach to integrating Live Clipboard
Becomes a “Service” we can apply to Gadgets
Demo…
In IE, when integrity is required, you can ask the user to stay on
the page until an operation completes (but you can't force them)
Emulating The Web Model
Scenario
Build an application with multiple views
e.g., Inbox, Calendar, and Contacts
The first view is loading
User quickly switches to another view
before data completely loads
Second view requests data
What happens?
Quick Demonstration…
Prioritizing Network
Requests
AJAX Scenario
Your page is preloading images
User clicks “Buy It" from your AJAX cart
When does the order request happen?
Proactively manage the network stack
Code/Resource Deployment
More Interactivity = More Code = Slower Site
How do you build sites with lots of components
How do you build a "portal" where the user controls the scope
of the application
How do you efficiently deploy the necessary code and
resources?
Understand how the browser works
Scripts included on the page block and load one at a time
Large number of script blocks can greatly stall loading
System for deploying code
Patterns allow component resources to load in any order
Deployed code asynchronously leveraging all available
connections
Prioritize the loading of components
Never expire static content (change the URL to break the cache)
X-Browser Development
Minimize browser specific code in the
business logic
Abstract and centralize API differences
We extend Firefox and Opera DOM to be
compatible with IE