Presentation is loading. Please wait.

Presentation is loading. Please wait.

Building Connected Windows 8 Apps with Windows Azure Web Sites Name Title Organization.

Similar presentations


Presentation on theme: "Building Connected Windows 8 Apps with Windows Azure Web Sites Name Title Organization."— Presentation transcript:

1 Building Connected Windows 8 Apps with Windows Azure Web Sites Name Title Organization

2

3 Basic Connectivity Media Location Push Notifications Agenda

4 Fundamentals

5 Compute: What are our Options? Virtualization O/S Hardware Native Code Custom Software Network Data Applications Firewall Applications Data Native Code Startup Tasks Applications Firewall Rules Data Virtual Network Native Code Custom Software Virtual Network Data Applications Firewall Rules O/S Applications Data Auth Notifications

6 Storage: What are our options? Benefits: Non-relational structured storage Massive scale-out Tables Storage Benefits: Big files Windows Azure Blobs Benefits: Persistent Async Messaging Enqueue, Dequeue Windows Azure Queues Benefits: Relational database Highly available Managed for you as a service SQL Database

7 Windows 8 Style UI Apps: Language Support JS/HTML C#/XAML C++ WinRT API Today HttpClient Media CameraCaptureUI Location Geolocator Notifications PushNotificationChannelManager

8 Basic Connectivity

9 Demo

10 Key Takeaway: Serialization format matters - Drivers http://localhost:33779/WcfDataService1.svc/Drivers 2010-05-24T22:12:38Z - http://localhost:33779/WcfDataService1.svc/Drivers(1) 2010-05-24T22:12:38Z - - - 1 1 Rob Tiffany - http://localhost:33779/WcfDataService1.svc/Drivers(2) 2010-05-24T22:12:38Z - - - 2 1 Loke Uei Tan - http://localhost:33779/WcfDataService1.svc/Drivers(3) 2010-05-24T22:12:38Z - - - 3 1 Dan Bouie - http://localhost:33779/WcfDataService1.svc/Drivers(4) 2010-05-24T22:12:38Z - - - 4 1 John Dietz - http://localhost:33779/WcfDataService1.svc/Drivers(5) 2010-05-24T22:12:38Z - - - 5 2 Derek Snyder - http://localhost:33779/WcfDataService1.svc/Drivers(6) 2010-05-24T22:12:38Z - - - 6 2 Steve Hegenderfer - http://localhost:33779/WcfDataService1.svc/Drivers(7) 2010-05-24T22:12:38Z - - - 7 2 Chip Vollers - http://localhost:33779/WcfDataService1.svc/Drivers(8) 2010-05-24T22:12:38Z - - - 8 2 James Pratt http://localhost:33779/WcfDataService1.svc/"http://schemas.microsoft.com/ado/2007/08/dataservices"http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"http://www.w3.org/2005/Atom"http://localhost:33779/WcfDataService1.svc/Drivershttp://localhost:33779/WcfDataService1.svc/Drivers(1)http://schemas.microsoft.com/ado/2007/08/dataservices/related/DistributionCenter"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Todays"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"http://localhost:33779/WcfDataService1.svc/Drivers(2)http://schemas.microsoft.com/ado/2007/08/dataservices/related/DistributionCenter"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Todays"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"http://localhost:33779/WcfDataService1.svc/Drivers(3)http://schemas.microsoft.com/ado/2007/08/dataservices/related/DistributionCenter"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Todays"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"http://localhost:33779/WcfDataService1.svc/Drivers(4)http://schemas.microsoft.com/ado/2007/08/dataservices/related/DistributionCenter"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Todays"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"http://localhost:33779/WcfDataService1.svc/Drivers(5)http://schemas.microsoft.com/ado/2007/08/dataservices/related/DistributionCenter"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Todays"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"http://localhost:33779/WcfDataService1.svc/Drivers(6)http://schemas.microsoft.com/ado/2007/08/dataservices/related/DistributionCenter"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Todays"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"http://localhost:33779/WcfDataService1.svc/Drivers(7)http://schemas.microsoft.com/ado/2007/08/dataservices/related/DistributionCenter"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Todays"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"http://localhost:33779/WcfDataService1.svc/Drivers(8)http://schemas.microsoft.com/ado/2007/08/dataservices/related/DistributionCenter"http://schemas.microsoft.com/ado/2007/08/dataservices/related/Todays"http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" The same list of 8 Customers using SOAP and a DataSet dropped us down to 3 kb but still too big for my taste. 1 1 Rob Tiffany 2 1 Loke Uei Tan 3 1 Dan Bouie 4 1 John Dietz 5 2 Derek Snyder 6 2 Steve Hegenderfer 7 2 Chip Vollers 8 2 James Pratt http://tempuri.org/"http://www.w3.org/2001/XMLSchema" OData 8.5kb <ArrayOfDriver xmlns=http://schemas.datacontract.org/2004/07/ContosoWcfService.Modelshttp://schemas.datacontract.org/2004/07/ContosoWcfService.Models xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> 1 1 Rob Tiffany 1 2 Loke Uei Tan 1 3 Dan Bouie 1 4 John Dietz 2 5 Derek Snyder 2 6 Steve Hegenderfer 2 7 Chip Vollers 2 8 James Pratt http://www.w3.org/2001/XMLSchema-instance" REST-XML 1.2kb [{"DistributionCenterId":1,"DriverId":1,"FirstName":“Nick","LastName":"Harris"}, {"DistributionCenterId":1,"DriverId":2,"FirstName":“Rob","LastName":“Tiffany"}, {"DistributionCenterId":1,"DriverId":3,"FirstName":"Dan","LastName":"Bouie"}, {"DistributionCenterId":1,"DriverId":4,"FirstName":"John","LastName":"Dietz"}, {"DistributionCenterId":2,"DriverId":5,"FirstName":"Derek","LastName":"Snyder"}, {"DistributionCenterId":2,"DriverId":6,"FirstName":"Steve","LastName":“Harris"}, {"DistributionCenterId":2,"DriverId":7,"FirstName":"Chip","LastName":"Vollers"}, {"DistributionCenterId":2,"DriverId":8,"FirstName":"James","LastName":"Pratt"}] JSON 639 bytes

11 Media

12 Storage: How do we keep secrets secret? Proxy the requests Client sends data to web role Web role sends data to storage (1) (2) Web Role

13 Storage: Using Shared Access Signatures Client makes request of Web Role for SAS Web Role sends client SAS Client makes Read Request or Writes direct Client gets response (1) (3) Web Role (2) (4)

14 Demo

15 Next Steps Optimize storage calls of CreateIfNotExist Larger files upload blocks in parallel to the blob Windows Azure CDN Windows Azure Media Services Use CloudConfigurationManager to allow portability between WAWs and Cloud Services

16 Geolocation

17 Location Basics

18 Demo

19 using System.Data.Spatial; namespace GeoLocation.Models { public class PointOfInterest { public Guid Id { get; set; } [StringLength(200)] public string Description { get; set; } public PointOfInterstType Type { get; set; } public string Url { get; set; } public DbGeography Location { get; set; } } } public class LocationContext : DbContext { public DbSet PointOfInterest { get; set; } } using (var db = new LocationContext()) { return db.PointOfInterest.Where(p => p.Location.Distance(origin) <= radiusInMeters); } EF 4.3.1 vs >= 5.0 with Spatial Data

20 Push Notifications

21 Push Notification Lifecycle Windows 8 (1) (2) (3)

22 Demo

23 Handle MessageSendResult Implement Notifications in a Worker Role There is a very rich set of notification templates available in Windows 8. Become familiar with them: Win8TileTypes – http://bit.ly/A8GuVghttp://bit.ly/A8GuVg Win8ToastTypes – http://bit.ly/MDHfJ4http://bit.ly/MDHfJ4 Win8BadgeTypes – http://bit.ly/LTf4GPhttp://bit.ly/LTf4GP Next Steps Try the NuGets http://nuget.org/packages/windows8.notifications http://nuget.org/packages/windowsazure.notifications http://nuget.org/packages/wnsrecipe

24 Application Building Blocks

25 ~1.25hr using Windows 8 + Windows Azure Basic Connectivity Media Location Push Notifications Summary

26 Download the Sample Source: http://www.nickharris.net/2012/06/building-connected-windows-8-apps-with- windows-azure/ Watch the video http://channel9.msdn.com/Events/TechEd/Europe/2012/AZR310 http://channel9.msdn.com/Events/TechEd/Europe/2012/AZR310 Note: For the sample you will need to update the storage account name+key and update the SQL connection string Sample Source

27 © 2011 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.


Download ppt "Building Connected Windows 8 Apps with Windows Azure Web Sites Name Title Organization."

Similar presentations


Ads by Google