Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Building Connected Apps withMobile ServicesMike Benkovich - @mbenkomike@benko.com
Session Objectives and TakeawaysWhat is Mobile Services?What are the components?Where to get the toolsHow to get started
Why Mobile Services?• Apps are everywhere• Where’s the Data• Who’s using it• Minimize custom code• Speed to market
Where does it run?• Web• Windows• Android• iOS• Windows Phone• etc…DataSvcDataIdentity
Connected Patterns• Create a Data Store• Add services• Host it somewhere• Make it workDataSvcDataIdentity
Scenarios• Modern Mobile ApplicationsWindows Store, Windows Phone, iOS, Android, HTML• Common ScenariosReduce the friction...
What is Mobile Services?
To get started…• Windows Azure subscription• Database for storing information– SQL Azure for rapid provisioning anddeploym...
Code to instantiate Mobile Services• In Application object add code to createan instance of your Mobile Service• Call meth...
Storage• SQL Database partitioned by schema– Appx.ToDoItem– Appy.ToDoItem• Manage data by standard SQL tools– SQL Manageme...
Work with SQL• Tables created in portal• Dynamic SQL Enabled• Create poco classes and persist astables
Identity• Use existing identity providers like Oauth– Microsoft, Twitter, Facebook, Google, etc.• Authorize to work with d...
Add code to triggerauthenticationprivate MobileServiceUser user;private async System.Threading.Tasks.Task Authenticate(){w...
Server logic• Scheduled jobs• Notification services• Diagnostics, logging and scale
Diagnostics, Logging andScale• Diagnostics– API calls– CPU Time– Data Out• Logging– console.error(…)– console.log(…)– …Sca...
Pricing during Previewreserved modeservice levelagreementsPreviewNo availability SLA*General Availability99.9%Private VM -...
Summary• Learn and understand the patterns forconnected applications• Use available tools and technologies tomake it simpl...
Codemotion Berlin-Mobile Services
Codemotion Berlin-Mobile Services
Codemotion Berlin-Mobile Services
Codemotion Berlin-Mobile Services
Upcoming SlideShare
Loading in …5
×

Codemotion Berlin-Mobile Services

239 views

Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Codemotion Berlin-Mobile Services

  1. 1. Building Connected Apps withMobile ServicesMike Benkovich - @mbenkomike@benko.com
  2. 2. Session Objectives and TakeawaysWhat is Mobile Services?What are the components?Where to get the toolsHow to get started
  3. 3. Why Mobile Services?• Apps are everywhere• Where’s the Data• Who’s using it• Minimize custom code• Speed to market
  4. 4. Where does it run?• Web• Windows• Android• iOS• Windows Phone• etc…DataSvcDataIdentity
  5. 5. Connected Patterns• Create a Data Store• Add services• Host it somewhere• Make it workDataSvcDataIdentity
  6. 6. Scenarios• Modern Mobile ApplicationsWindows Store, Windows Phone, iOS, Android, HTML• Common ScenariosReduce the friction and work required by providing solutions topatterns to work with authentication, push notification,structured storage and more• Rapid DevelopmentProvision and deploy solutions in minutes rather than days orweeks
  7. 7. What is Mobile Services?
  8. 8. To get started…• Windows Azure subscription• Database for storing information– SQL Azure for rapid provisioning anddeployment– Dynamic Schema• Service configuration and scaling– Scripting on data– Identity and notifications• SDK to enable identity and notifications
  9. 9. Code to instantiate Mobile Services• In Application object add code to createan instance of your Mobile Service• Call methods to operate on theservice…i.e.public static MobileServiceClient MobileService = new MobileServiceClient("https://demoapp123.azure-mobile.net/","OxxAAAAbbbCCCCCddEEEfffGGGh12345");private void ButtonSave_Click(object sender, RoutedEventArgs e){var todoItem = new TodoItem { Text = TodoInput.Text };InsertTodoItem(todoItem);}
  10. 10. Storage• SQL Database partitioned by schema– Appx.ToDoItem– Appy.ToDoItem• Manage data by standard SQL tools– SQL Management Studio– Portal– REST API– CLI Tools
  11. 11. Work with SQL• Tables created in portal• Dynamic SQL Enabled• Create poco classes and persist astables
  12. 12. Identity• Use existing identity providers like Oauth– Microsoft, Twitter, Facebook, Google, etc.• Authorize to work with data• Table options– Everyone– With application key– Authenticated users– Admins
  13. 13. Add code to triggerauthenticationprivate MobileServiceUser user;private async System.Threading.Tasks.Task Authenticate(){while (user == null){string message;try{user = await App.MobileService.LoginAsync(MobileServiceAuthenticationProvider.Facebook);message =string.Format("You are now logged in - {0}", user.UserId);}catch (InvalidOperationException){message = "You must log in. Login Required";}MessageBox.Show(message);}}
  14. 14. Server logic• Scheduled jobs• Notification services• Diagnostics, logging and scale
  15. 15. Diagnostics, Logging andScale• Diagnostics– API calls– CPU Time– Data Out• Logging– console.error(…)– console.log(…)– …Scale - ComputeScale out instance countScale up VM sizeScale - StorageScale out mobile service tenant todedicated SQL DBScale up SQL DB
  16. 16. Pricing during Previewreserved modeservice levelagreementsPreviewNo availability SLA*General Availability99.9%Private VM - Small instanceis the only size availableFree - unlimited inbounddata. 165MB outbounddata/day, excess charged.Pay - SQL Database,Compute same reduced rateas Web Sites i.e 33%discount, excess outboundtransfers starting at$0.12/GBUp to 100 applicationsshared mode
  17. 17. Summary• Learn and understand the patterns forconnected applications• Use available tools and technologies tomake it simpler• Try Azure Mobile Services today for FREE!http://aka.ms/AzureTrialMB• More info on my sitehttp://www.Benkotips.com

×