building connected ios apps with mobile services
Embed Size (px)
DESCRIPTION
Building Connected iOS Apps With Mobile Services. Chris Risner Senior Technical Evangelist @ chrisrisner. Microsoft Azure. About me. @ chrisrisner. Technical Evangelist. Live in Washington. Chrisrisner.com. Mobile dev for 5+ years. Grew up in Michigan. Agenda. Mobile Services. - PowerPoint PPT PresentationTRANSCRIPT
PowerPoint Presentation
Building Connected iOS Apps With Mobile ServicesChris RisnerSenior Technical [email protected]
Microsoft AzureAbout me2Technical [email protected] in WashingtonGrew up in MichiganMobile dev for 5+ yearsAgenda3Microsoft AzureMobile ServicesFeatures and DemosAdvanced FeaturesScaling and PricingQuestionsWhat is Azure?Hosting and ServicesMassively scalableGeographically availableAffordable4What is Mobile Services?5
StorageAuthenticationLogicPushScheduler5Demo: Getting StartedYour first Mobile ServiceStructured StoragePowered by SQL DatabaseSupports rich querying capabilitiesDynamic SchematizationData management in:Azure PortalSQL Portal (Silverlight)SQL Management StudioREST APIAzure CLI ToolsSQL CLI7Microsoft AzureThe REST API8ActionHTTP MethodURL SuffixCreatePOST
/TodoItem
Read
GET
/TodoItem?filter=id%3D42
Update
PATCH
/TodoItem/id
DeleteDELETE/TodoItem/idMicrosoft AzureBase Endpoint: https://MobileService.azure-mobile.net/tables/*JSON to SQL Type Mappings9JSON TypeT-SQL TypeNumeric values (integer, decimal, floating point)Float(53)
Boolean
bit
DateTime
DateTimeOffset(3)
StringNvarchar(max)Microsoft AzureAuto-generated Columnsid unique guid__createdAt date__updatedAt date__version timestampHelps with concurrency and offline10Microsoft Azure10Backend Logic:.NET & JavaScript11Server Side Table Scripts12Node.js scriptsIntercept CRUD requests to tablesPasses through to SQL by defaultFully customizable.NET backend in Visual StudioNode Modules13requestpush.*consolemssqltablesazuresendgridpushertwilioDemo: Customizing LogicAdding Data ValidationCustom APINon-table based scriptsAccessible fromGETPOSTPUTPATCHDELETEExpose any functionality you want15Microsoft AzurePush Notifications16Push Notification Flow17Microsoft AzureRegister for push notifications with APNSSend your identifier to Mobile ServiceSend push from server scriptsAPNS delivers notification to deviceClientAppMobile ServicesAPNS(1)(2)(3)(4)Demo: Adding PushNotification HubsSeparate from Mobile ServicesCan be used regardless of whether youre storing data in AzureExtremely scalable push notificationsCross platform supportPush to iOS, Android, Kindle, Windows Phone, Windows StoreTags (i.e. tie my registration to this topic or user ID)Templates (i.e. when I get a push, send it in this format)Connect to using Azure module19Microsoft AzureAuthorization&Authentication20Data AuthorizationPer HTTP method auth options:App Key RequiredNot ideal for production useEveryoneAuthenticated UsersAdmins and other scriptsRequires Master Key as header400 Unauthorized response if security check fails21Microsoft AzureUser Auth Flow (server)22Microsoft AzureGOOGLEFACEBOOKTWITTER MOBILE SERVICE DEVICECREDENTIALS (via oAuth/WebView) MICROSOFTIDENTITYAUTH TOKENGRAPH ACCESS (LIMITED)User Auth Flow (client)23Microsoft AzureGOOGLEFACEBOOKTWITTER MOBILE SERVICE DEVICEMICROSOFTAUTH CODEAUTH CODE + TOKENGRAPH ACCESSCREDENTIALS(via native SDKs)
IDENTITYGRAPH ACCESSThe User objectUser.levelAdminAuthenticatedAnonymousUser.userIdProvider:id or undefinedUser.getIdentities()UserIdProvider Access Token / SecretBasic user information (i.e. name, username, locale, picture, link)24Microsoft AzureDemo: Adding AuthLock Down and LoginCommand Line Interface26CLI27Create / Delete ServicesInspect / Delete Table DataCreate / Update / Delete Tables and PermissionsCreate / Upload / Delete ScriptsScale Up / Down ServicesMuch More Across AzureDemo: Using the CLIScheduler29Scheduled JobsExecutes a script on defined scheduleCan be run on demandIdeal for any backend data processing job30Microsoft AzureScriptSourceControl31Script Source ControlCreates a Git repo in AzureAccess table, scheduler, custom API, shared scripts and permissionsPushing changes triggers a redeploy of your Mobile ServiceEnables installing NPM modules
Shared ScriptsCreate scripts that can be used from all other scripts in your Service32Microsoft AzureDiagnosticsLoggingScale33Diagnostics, Logging, Scale34API Calls, # of Devices, Data OutConsole Logging (auto error logging)Scale Service Based off API CallsAuto-scale to Save MoneyFree Tier for Mobile Free Tier for SQLMobile Service Scaling Free: 500k calls / month / subscription Basic: 1.5M calls / unit (6) / month Standard: 15M calls / unit (10) / month35Demo: ScalingLeaving Free Mode and Turning on AutoScaleMobile Service Tiers37Microsoft Azureusage & licensing$service level agreementsGeneral Availability99.9%FreeBasicStandardUsage RestrictionsUp to 10 services,Up to 500 Active Devices*N/AN/AAPI Calls500K (per subscription)1.5M(per unit)15M(per unit)ScaleN/AUp to 6 (in portal)Up to 10 (in portal)Scheduled JobsLimitedIncludedIncludedSQL Database (required)20MB free DB20MB free DB20MB free DB*Active devices refers to the number of physical devices and emulators that make at least one call to or receive a push notification from your mobile service.What is Mobile Services?38
StorageAuthenticationLogicPushScheduler38ResourcesGet a FREE Microsoft Azure Trial Account:http://azure.microsoft.comVideos, Tutorials, and Morehttp://azure.microsoft.com/iosSDK Source Code on GitHubhttps://github.com/Azure/azure-mobile-servicesContact Detailshttp://chrisrisner.comhttp://aka.ms/[email protected] AzureThanks!Questions?
Build 2012 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.4/22/1440 2014 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.Azure footprint16 regions worldwide in 2014 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.4/22/14 12:5442Fortune 500 using Azure>57%>250kActive websitesGreater than1,000,000SQL Databases in Azure>20TRILLIONstorageobjects
>300MILLIONAD users>13BILLIONauthentication/wk>2MILLIONrequests/sec>1MILLION
Developers registered with Visual Studio OnlineBuild 2012 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.4/22/1443
44
Get startedVisit azure.microsoft.comBuild 2012 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, 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.4/22/1445