1 / 23

Live Services: What I Learned Building My First Mesh Application

BB41. Live Services: What I Learned Building My First Mesh Application.  Don Gillett Principal Architect Microsoft Corporation. Agenda. Mesh Application Overview Jot Demo Key Takeaways and Tips Code walkthrough Q & A. Azure ™ Services Platform. Azure ™ Services Platform.

princess
Télécharger la présentation

Live Services: What I Learned Building My First Mesh Application

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. BB41 Live Services: What I Learned Building My First Mesh Application  Don Gillett Principal Architect Microsoft Corporation

  2. Agenda • Mesh Application Overview • Jot • Demo • Key Takeaways and Tips • Code walkthrough • Q & A

  3. Azure™ Services Platform Azure™ Services Platform

  4. Mesh ApplicationsSynchronized access to your shared data

  5. Jot • Simple note taking and list creation • Notes and lists can be shared between people and across devices. • Developed Jot as both a Mesh Application and a ‘Mesh Enabled’ Desktop Application • Key Scenarios • Shopping Lists • Weekend To-do Lists • Gift List • Expense List • “Digital Junk Drawer”

  6. demo Jot

  7. Key Takeaways • Live Framework delivers another great component for .NET developers… it just fits in and getting started is simple. • A synchronized data store is at the heart of Mesh and it’s easy to utilize. • Mesh Applications work great with Silverlight. Mesh + Silverlight makes an excellent rapid development platform. • Compile your projects for both Silverlight and the full .NET runtime (desktop apps and services). • Best part... what I didn't have to do. User management, authentication, invites, contacts, permissions, ...

  8. Getting Started With The Live Framework Libraries • using Microsoft.LiveFX.Client; • Mesh mesh = ConnectToMesh(); • foreach (MeshObjectmeshObjectin mesh.MeshObjects.Entries) • { • Console.WriteLine("MeshObject:\t{0} (type {1})", • meshObject.Resource.Title, • meshObject.Resource.Type); • foreach (DataFeeddataFeedin meshObject.DataFeeds.Entries) • { • Console.WriteLine(" DataFeed:\t{0} (type {1})", • dataFeed.Resource.Title, • dataFeed.Resource.Type); • foreach (DataEntrydataEntryin dataFeed.DataEntries.Entries) • { • Console.WriteLine(" DataEntry:\t{0} (type {1})", • dataEntry.Resource.Title, • dataEntry.Resource.Type); • } • } • }

  9. Storing Data In The MeshCreating a 'Storage Model' • MeshObjects, DataFeeds, DataEntries, and Enclosures make up the Mesh storage hierarchy… • MeshObjects are our top level containers • MeshObjects represent the unit you want to share. • Live Folders creates one MeshObject for each top level Live Folder that is created. Jot also creates one MeshObject for each Jot list.

  10. Storing data in the Mesh Creating a 'Storage Model' (continued) • MeshObjects can contain 1 or more DataFeeds. • DataFeeds represents a collection of data you want to access and group together • DataEntries • Represents your smallest storage units and can contain small chunks of application data directly within the DataFeed • Enclosures • Enclosures are used when your chunks of data get too big. • They are stored in the Mesh and referenced from a DataEntry.

  11. Live Framework Resource Model LOE End-Point Mesh Objects Notification Queue News Applications Devices Contacts Mesh Scripts Profiles Members Mappings Data Feeds News Subscription Data Entry Data Entry Media Resources

  12. Storing Data In The MeshThe Code Evolve from flat serialization or database storage to a merge-able storage schema using DataEntries • Step 0 - We’ll start with an application that knows how to persist to a database or flat file. • Step 1 - Reading and writing DataEntries from a DataFeed rather than directly serializing or loading from a database. • Step 2 – Utilize FeedSync. With FeedSync integration we can easily batch our changes, as well as easily accept changes made from other devices and users.

  13. Code WalkthroughSilverlight and WPF data binding • Synchronization of data makes a good system of change notification all that more important. • INotifyCollectionChanged and INotifyPropertyChanged facilitate Silverlight and WPF data binding • ObservableCollection<T> implements INotifyCollectionChanged • One major gotcha is that notifications going to UI need to happen on the UI thread. (Try these search terms some good articles about getting change notifications to the UI thread for Silverlight and WPF.)

  14. Code Walkthrough Object Model Checklist ChecklistItem Mow the grass Buy gifts Call home ChecklistItemData ChecklistItem ChecklistItemData ChecklistItem ChecklistItemData

  15. code walkthrough Checklist Application

  16. The Things Live Framework Gives Me Beyond Storage • Membership based on Windows Live ID • Authentication • Sharing Permissions and Invites • Contacts • News Feeds • Application Distribution • …

  17. Cross Development Between Silverlight And .NET (Desktop And Services)

  18. Usefull (Invaluable) Tools Resource Model Browser Comes with the Live Framework SDK Fiddler 2 Download from http://fiddlertool.com

  19. Fiddler TipHow to substitute/debug any file on the web without uploading it • staticfunctionOnBeforeResponse(oSession:Session) • { if(oSession.uriContains("myapp.xap")) {oSession["ui-color"]="red";oSession["ui-italic"]="true";oSession.LoadResponseFromFile( • "C:\\myapp\\bin\\debug\\myapp.xap");oSession.oResponse.headers.Add("Vary","*"); } • …

  20. Evals & Recordings Please fill out your evaluation for this session at: This session will be available as a recording at: www.microsoftpdc.com

  21. Q&A Please use the microphones provided

  22. © 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.

More Related