azure mobile services
DESCRIPTION
Slides used in Global Windows Azure Bootcamp, session was about using Azure Mobile Services along with SignalR, ASP.NET Web API to build Windows Phone 8.1 App.TRANSCRIPT
![Page 1: Azure Mobile Services](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5585a6ccd8b42a7b1a8b4b0d/html5/thumbnails/1.jpg)
Win 8 App, Web API, and SignalR Integration on Azure Services
Taiseer JoudehSenior IT Team Lead at Aramex
Twitter: @tjoudeh Blog: http://bitoftech.net
![Page 2: Azure Mobile Services](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5585a6ccd8b42a7b1a8b4b0d/html5/thumbnails/2.jpg)
What we’ll build in this session?Solution for Azure Day Restaurant, requirements are:
• Client App which will be used by hostess to register clients on waiting list.
• Backend web app used my Restaurant Manager to monitor waiting list with real time updates.
• Low administration and fast deployments with the ability to scale-up in future.
• Reliable and secure medium to store the data.
![Page 3: Azure Mobile Services](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5585a6ccd8b42a7b1a8b4b0d/html5/thumbnails/3.jpg)
Technology used?Different Microsoft technologies will be used:
• Windows 8 App to build client App used by the hostess.
• HTML 5 and ASP.NET Web API to build Web App.
• Real time updates using SignalR.
• Hosting the RESTful backend end points on Azure Mobile Services.
• Hosting the Web APP on Azure Websites.
• Saving data securely on SQL Azure Database.
![Page 4: Azure Mobile Services](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5585a6ccd8b42a7b1a8b4b0d/html5/thumbnails/4.jpg)
Architecture for the solution
![Page 5: Azure Mobile Services](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5585a6ccd8b42a7b1a8b4b0d/html5/thumbnails/5.jpg)
What is Azure Mobile Services?• One common scalable cloud backend to serve different
clients and mobile apps (iOS, Android, Windows 8, Windows Phone, SPA, etc…)
• Exposes secure RESTful endpoints which can be used to save structured data in SQL Azure Database.
• Ability to integrate users authentication, and send updates using push notifications.
![Page 6: Azure Mobile Services](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5585a6ccd8b42a7b1a8b4b0d/html5/thumbnails/6.jpg)
Demo 1 – Create Azure Mobile Service
![Page 7: Azure Mobile Services](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5585a6ccd8b42a7b1a8b4b0d/html5/thumbnails/7.jpg)
Demo 2 – Build Win 8 App and connect to Azure Mobile Service
![Page 8: Azure Mobile Services](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5585a6ccd8b42a7b1a8b4b0d/html5/thumbnails/8.jpg)
Demo 3 – Build Web App and Web API end point
![Page 9: Azure Mobile Services](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5585a6ccd8b42a7b1a8b4b0d/html5/thumbnails/9.jpg)
Demo 4 – Deploy Web App to Azure Websites Service
![Page 10: Azure Mobile Services](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5585a6ccd8b42a7b1a8b4b0d/html5/thumbnails/10.jpg)
Adding Real Time Updates• We want to add async data exchange between the
server and the client in real time.
• Server should take initiative and send info when available to connected clients.
![Page 11: Azure Mobile Services](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5585a6ccd8b42a7b1a8b4b0d/html5/thumbnails/11.jpg)
Adding Real Time Updates – Cont.Available standards and protocols
• 1. Web Sockets: Persistent connection between client and server.• Pros: Two way channel and consider the fastest.
• Cons: Available on modern browsers only (IE 10, Chrome, FireFox) Not fully supported on Safari and Opera.
![Page 12: Azure Mobile Services](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5585a6ccd8b42a7b1a8b4b0d/html5/thumbnails/12.jpg)
Adding Real Time Updates – Cont.• 2. Server Sent Events: One directional channel from
the server to client.• Pros: Easy to implement.
• Cons: Not available in IE, if the clients needs to send data to the server new connection should be opened.
• 3. Long Polling: Client opens connection and kept open until the server has something to notify.
• 4. For ever frame: Uses HTML iFrame to keep connection opened with the server.
![Page 13: Azure Mobile Services](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5585a6ccd8b42a7b1a8b4b0d/html5/thumbnails/13.jpg)
SignalR for Real Time UpdatesWhat does SignalR offer?
• Isolate us from the low level details, giving us the impression of working with open persistent connection.
• Contains components specific to both ends.
• In charge of determining which is the best technique available both to the client and the server.
• Always try to use the most efficient transport, and keep failing back until it finds one compatible, this done in initial stage (negotiation).
![Page 14: Azure Mobile Services](https://reader036.vdocuments.mx/reader036/viewer/2022081404/5585a6ccd8b42a7b1a8b4b0d/html5/thumbnails/14.jpg)
Thank You!