370 likes | 534 Vues
BB30. Live Services Building Mesh-Enabled Web Applications Using the Live Framework . Arash Ghanaie-Sichanie Senior Program Manager Microsoft Corporation. Key Take away. Live Services for Applications. Mesh Application.
E N D
BB30 Live Services Building Mesh-Enabled Web Applications Using the Live Framework Arash Ghanaie-Sichanie Senior Program Manager Microsoft Corporation
Live Services for Applications Mesh Application
Mesh-Enabled Application Life CycleHow do we look at Applications Developers Users
Conventional Application Choices Client Applications -- Rich -- Websites -- Reach -- Mesh-Enabled Web Applications • High points: • Access from anywhere • Instant On Updates • Sandboxed to Browser • deployment & Update • Discoverable • Shareable • Challenges: • Occasional Connection(offline) • Rich User Experience • Native User experience • Must be hosted at scale • High points: • Richer User experience • Native User Experience • occasionally connected (Offline) • Hosted on OS • Challenges: • Deployment & Update • Discoverability • Ability to share • Sandboxing & Access control
Mesh-Enabled Web Applications Sync… Websites Devices & Social Mesh
Application Types/Terminology • Live Framework supports two major application types • Mesh-Enabled Web Applications • Hosted and deployed in user’s Mesh • Takes full advantage of Live Services • Most support for Application Life Cycle • Any other Mesh-Enabled Applications that use Live Services • Covers all the other application types that don’t fit in the previous category • Use a subset of Live Services including client/cloud endpoints
demo Quick Lap Around Mesh-Enabled ApplicationsUser Experience
Key Tenants of “Mesh-Enabled Web Applications” • Application Mesh Object • Data Feed(s) • Application Data • Settings • User data • Associated Mesh Objects • Access to user data Mesh-Enabled Web Application
demo Building Mesh-Enabled Applicatins Using Visual Studio
Application and Data Key Concepts 1 ∞ Application (Catalogue) Installed Application User Private Data User Installs User Gives Access User Creates ∞ ∞ Application Instance Application Member User Shares Has ∞ Application Mesh Object
Application Sharing Model Application Catalogue Mesh App 1 Mesh App 2 Mesh App n User 1’s Mesh User 3’s Mesh User 2’s Mesh Shared App1 Instance A App1 Instance A App2 Instance C Shared App1 Instance B App2 Instance A App3 Instance A App1 Instance C App1 Instance C App3 Instance C
Optional Mesh Bar • One per App Instance • Live Framework APIs allows: • Manage app News • Manage app Members • View mapped Devices News Members Devices
Silverlight 2 Integration • public Page() • { • InitializeComponent(); • MeshApplicationServicemeshApp = Application.Current.GetMeshApplicationService(); • meshApp.LoadCompleted += newEventHandler(app_Load); • meshApp.Load(); • } • voidapp_Load(object sender, EventArgs e) • { • MeshApplicationServicemeshApp = Application.Current.GetMeshApplicationService(); • RenderContent(meshApp); • } • voidRenderContent(MeshApplicationServicemeshApp) • { • //Accessing Mesh • myMesh = meshApp.LiveOperatingEnvironment.Mesh; • //Accessing the Application Mesh Object • meshApp.Resources.Title = "My Title"; • }
JavaScript Libraries • MeshApp.run = functionMeshApp$run() { • Microsoft.LiveFX.MeshApplication.loadAsync(windows.location.hostname, Delegate.create(null, function(meshApplicationContext) • { • if (meshApplicationContext.state !== Microsoft.LiveFX.OperationState.Success) • { • MeshApp._showError('MeshApplication Load Failed'); • } • else • { • varmeshApplication = meshApplicationContext.resource; • meshApplication.get_runtimeEndpoint().get_mesh().loadAsync • (Delegate.create(null, function(meshOperationContext) • { • MeshApp._onLoadMesh(meshOperationContext); • })); • } • }));
Delegated Authentication for WebsitesSimple Flow • Enables users to share mesh data and apps with Websites User 1) Add to Mesh Third Party Web Site 2) Consent Request Live Desktop ________ Cloud Services 5) Auth Token 6) Call Endpoint 3) Consent UI 4) Agree to Consent
demo How to get a Delegated Auth Token
MeshPack AppsShowcasing the Promise of Live Mesh Collaborative Crossword • Work on puzzles with your friends, anyplace, anytime • Silverlight UI using with Silverlight Mesh libraries • Puzzles stored as a Feed, with each item representing a square (x, y, letter, user) • No server-side code! • MeshLists • Create, edit & share lists (camping equip, staffing, etc.) • JavaScript UI & Mesh Libraries • Each list stored as a feed, with each row as an item • Schema is stored as a second Feed, including identifiers • Mesh handles sending data to the cloud • Crowd Vote • Efficient, collaborative decision making • Same foundation as MeshLists – a Feeds for rows and a Feed for options • New item in the rows Feed created when a new member accepts Mesh invite • Corkboard • Bulletin board for the digital life • JavaScript Data stored as a Feed, each note is an item • Name and Title are standard item elements • Custom attributes added to items using Mesh-provided extension to map key/value pairs
Key Take Away (take 2) Mesh Synchronizes Apps and Data Mesh-enabled Web Apps Extend Web Sites to Desktop Various Apps can Benefit From Live Framework User is in Full Control of their Apps and Data
Live Framework Libraries .NET FX APIs Silverlight™ APIs JavaScript APIs Client Controls Web Controls Other Resource Model ATOM JSON POX RSS Binary XML Atom Pub FeedSync Tools & Services CRUD URI-LINQ Triggers Auth/Z Introspection Resource Scripts Operations Developer Portal Data Applications Communications Profile Groups Folders Catalog Peer-to-Peer Developer Sandbox Contacts Calendars Photos Application Settings Notifications Provisioning/Account Management Custom Data Types Application Management Presence Identity News User System Geospatial Search Analytics Visual Studio® Tools/ Designers Mesh User Mesh Device Mesh Application Mesh Synchronization Live Operating Environment CRUD Resource Script Engine Cache Analytics Sync Engine Auth/Z CRUD Resource Script Engine Sync Engine Auth/Z Files System Peer-to-Peer Cash/Local Store Resource Manager Peer-to-Cloud :Cloud_ :Client_ Windows Other Windows® Azure ™ Embedded Windows Mobile
Mesh-Enabled Applications • To End-Users “A set of tools and experiences for acquiring, using, managing and sharing any type of applications in a consistent and coherent, way across all of your devices” • To Developers “A set of tools, services and APIs for building, deploying, maintaining and managing viral, rich and socially aware applications, at lower cost and wider reach”
demo Demo Title Presenter Name Title Group
announcing Live Framework Custom Technology Preview Nov 2008
Evals & Recordings Please fill out your evaluation for this session at: This session will be available as a recording at: www.microsoftpdc.com
Q&A Please use the microphones provided
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.