BRK3157: Light Up Mobile Apps with the Office 365 APIs

[Speaker: Richard diZerega] Visual Studio developers have two powerful options for developing multi-device applications: Cordova and Xamarin. Cordova support in Visual Studio enables you to ship mobile applications written with HTML/JS,  while Xamarin enables developers to use Visual Studio to write native applications for iOS, Android, and Windows Phone using C#. This session shows you how to use the Office 365 APIs in mobile device applications to take advantage of the many services in Office 365. The Office 365 APIs make available the following services: Azure Active Directory Users and Groups, Files (OneDrive and OneDrive for Business), Mail, Calendar, Contacts, and SharePoint Sites.

Best PracticesBreakoutIgnite2015Office 365 APIs
1.0x

BRK3157: Light Up Mobile Apps with the Office 365 APIs

Created 2 years ago

Duration 1:20:58
lesson view count 88
[Speaker: Richard diZerega] Visual Studio developers have two powerful options for developing multi-device applications: Cordova and Xamarin. Cordova support in Visual Studio enables you to ship mobile applications written with HTML/JS,  while Xamarin enables developers to use Visual Studio to write native applications for iOS, Android, and Windows Phone using C#. This session shows you how to use the Office 365 APIs in mobile device applications to take advantage of the many services in Office 365. The Office 365 APIs make available the following services: Azure Active Directory Users and Groups, Files (OneDrive and OneDrive for Business), Mail, Calendar, Contacts, and SharePoint Sites.
Select the file type you wish to download
Slide Content
  1. Light Up Mobile Apps with the Office 365 APIs

    Slide 1 - Light Up Mobile Apps with the Office 365 APIs

    • Richard diZerega
    • @richdizz
    • http://www.richdizz.com
    • BRK3157
  2. Session Objectives and Takeaways

    Slide 2 - Session Objectives and Takeaways

    • Session Objective(s)
    • Explore development options for building Office 365-enabled mobile applications
    • Demonstrate patterns for authentication, discovery, and operations across mobile SDKs
    • Investigate key decision criteria for selecting a development platform and APIs
    • Illustrate key differences in building native vs. cross-platform mobile apps
    • Key Takeaway(s)
    • The Office 365 APIs provide a consistent pattern for building Office 365-enabled mobile applications
    • Developer SDKs and REST options exist across all the major mobile platforms (Windows, iOS, Android)
    • Visual Studio provides the best experience for Office 365 development, but open platform is key pillar
  3. Slide 3

    • DATA
    • USERS
    • HTML
    • Developer vision
  4. Office 365 Developer Vision

    Slide 4 - Office 365 Developer Vision

    • EXTEND OFFICE EVERYWHERE
    • Delve
    • Video Portal
    • My Apps
    • CONNECT TO OFFICE 365 SERVICES
    • Users and groups
    • Files
    • Mail
    • Calendar
    • Contacts
    • Office Graph
    • Documents
    • Presentations
    • Spreadsheets
    • Lync
    • OneNote
    • Yammer
    • BUILD USING AN OPEN PLATFORM
    • z
  5. Mobile Platform Decision Tree

    Slide 5 - Mobile Platform Decision Tree

  6. Office 365 APIs

    Slide 6 - Office 365 APIs

    • What are they?
    • Simple REST/OData Service APIs
    • Many are wrapped in strongly-typed SDKs (SharePoint, Exchange, Azure AD)
    • Part of Azure AD Common Consent Framework
    • Leverages Azure AD OAuth
    • Supports both delegated and application permissions
    • Launch Services
    • MyFiles (OneDrive for Business)
    • Sites (SharePoint Online)
    • Calendar (Exchange Online)
    • Contacts (Exchange Online)
    • Mail (Exchange Online)
    • Users/Groups (Azure AD)
    • NEW Services
    • OneNote with Office 365
    • User Profiles (SharePoint Online)
    • Managed Metadata (SharePoint Online)
    • Video Portals
    • Office 365 Groups
    • Office Graph
    • Not limited to Office 365
    • Power BI
    • Dynamics CRM Online
    • 3rd Party Applications/Services
    • Your Own Applications/Services
  7. Azure AD OAuth in Office 365

    Slide 7 - Azure AD OAuth in Office 365

    • Single authentication flow
    • Across all Office 365 services
    • Device apps and web sites
    • Admin and end-user consent
    • Secure protocol
    • OAuth 2.0 (no capturing user credentials)
    • Fine-grained access scopes
    • Supports MFA and federated user sign-in
    • Long-term access through refresh tokens
    • Unique Considerations of “Native” Azure Apps
    • Inherently multi-tenant
    • No client/app secret (think about distribution)
    • Leverage a web authentication broker (via ADAL)
    • No application-only permissions (can go through proxy service)
  8. Native Mobile Apps

    Slide 8 - Native Mobile Apps

  9. Slide 9

    • Universal Windows Apps
    • About
    • Build application that runs across Windows Phones, tablets and PCs
    • Introduced at //build 2014 for Windows 8.1 and Windows Phone 8.1
    • Windows 10 realizes the convergence of Phone and PC
    • Development
    • IDE: Visual Studio 2013 w/ Update 2+ and Windows Phone SDK
    • App Registration: Add Connected Service Wizard
    • SDK Integration: Add Connected Service Wizard
    • When to use
    • Target device footprint is exclusively Windows
    • Application needs unique device-specific capabilities
    • Complex/Advanced user experience or visualizations
    • Applications with strict enterprise requirements
  10. Universal Windows Apps

    Slide 10 - Universal Windows Apps

    • Solution Structure
    • 8.1 projects contains 3 projects (Windows, Windows Phone, Shared)
    • Shared Project contains no references (uses device-specific references)
    • Windows 10 solutions are truly universal
    • Debugging
    • Debug one device project at a time (set manually or active project)
    • Template allow debugging against emulators or physical devices
    • Additional Tips
    • Add connected service to BOTH device projects (8.1 only)
    • Leverage partial classes on forms and device-specific switches as needed (ex: #if Windows_Phone_App and #if Windows_App)
    • Web Authentication Broker is one example where code will differ
    • Windows 10 can leverage token broker
  11. Demo

    Slide 11 - Demo

    • Universal App Development with Office 365
  12. Android

    Slide 12 - Android

    • About
    • Open source Office 365 SDK for Android by MS Open Tech (3/2014)
    • Available on GitHub (http://bit.ly/14JCgWZ)
    • Also requires ADAL for Android (http://bit.ly/1E7IfSi)
    • Development
    • IDE: Android Studio (or Eclipse)
    • App Registration: Azure Management Portal
    • SDK Integration: build.gradle (similar to NuGet for dependencies)
    • When to use
    • Target device footprint is exclusively Android
    • Application needs unique device-specific capabilities
    • Complex/Advanced user experience or visualizations
  13. Android

    Slide 13 - Android

    • Solution Structure
    • Form design (UI) is defined in .XML files (app\src\main\res\layout)
    • Form logic is defined in .java files deriving from Activity
    • Build.gradle references dependencies
    • AndroidManiest.xml is the app configuration file
    • Debugging
    • Debug apps with emulators (warning: SLOW) or Android device
    • Consider Genymotion emulators that install separate from IDE
    • Visual Studio 2015 Emulator
    • Additional Tips
    • Make sure you give the app permission to use the internet (in AndroidManifest.xml)
    • Controls aren’t automatically referenced in form logic (must use findViewById)
  14. Demo

    Slide 14 - Demo

    • Android Development with Office 365 in Android Studio
  15. iOS

    Slide 15 - iOS

    • About
    • Open source Office 365 SDK for iOS by MS Open Tech (10/2014)
    • Available on GitHub (http://bit.ly/155NpCI)
    • Also requires ADAL for iOS (http://bit.ly/1u9Mexa)
    • Apple does not permit compilation of iOS apps without Mac
    • Development
    • IDE: Mac and XCode (Objective C or Swift)
    • App Registration: Azure Management Portal
    • SDK Integration: Cocoapods or manual build/copy
    • When to use
    • Target device footprint is exclusively iOS
    • Application needs unique device-specific capabilities
    • Complex/Advanced user experience or visualizations
  16. iOS

    Slide 16 - iOS

    • Solution Structure
    • Form design (UI) is defined in .storyboard files and logic is defined in view controllers
    • References can be in the form of static libraries (.a) or frameworks (.framework), which include header files
    • ADAL for iOS is a static library and the Office 365 SDK for iOS is a framework
    • Debugging
    • XCode includes a really nice iOS emulator for debugging
    • Registered Apple Developers ($99) can debug on physical iOS devices
    • Additional Tips
    • Combine ADAL builds for emulator and physical device
    • Use bridging header files for Objective-C references in Swift projects
    • Println and Watch Expressions are really helpful tools for noobs
  17. Demo

    Slide 17 - Demo

    • iOS Development with Office 365 in XCode
  18. Cross-Platform Mobile Apps

    Slide 18 - Cross-Platform Mobile Apps

  19. Apache Cordova

    Slide 19 - Apache Cordova

    • About
    • Platform for developing mobile apps with HTML, CSS and JavaScript
    • Open source collection of JavaScript that abstracts device-specific APIs
    • All web assets are copied local to the device and run “Chromeless”
    • Foundation for PhoneGap, AppBuilder, Ionic, etc
    • Development
    • IDE: Visual Studio 2013 w/ Update 4 and VS Tools for Cordova CTP3*
    • App Registration: Add Connected Service Wizard
    • SDK Integration: Add Connected Service Wizard
    • When to use
    • Multi-tenant apps or apps that target multiple mobile platforms
    • Developers are skilled in web development (HTML, CSS, JavaScript)
    • Licensing costs prohibit other cross-platform frameworks
  20. Apache Cordova

    Slide 20 - Apache Cordova

    • Solution Structure
    • Office 365 assets installed under /services/office365
    • Settings.js defines app details (client id, app redirect, etc)
    • o365Loader.js dynamically adds Office 365 SDK references to pages
    • Debugging
    • Debug in Ripple (in-browser emulator), emulators, or physical devices
    • Debug iOS w/ remote Mac (can use emulator or remote/local device)
    • Additional Tips
    • Numerous Cordova plug-ins exist for rich device integration (Custom with Git)
    • Use NuGet to reference additional packages (Bootstrap, Angular, etc)
    • Cordova renders HTML…no native controls (w/o additional references)
  21. Demo

    Slide 21 - Demo

    • Cordova Development with Office 365
  22. Xamarin

    Slide 22 - Xamarin

    • About
    • Xamarin is a Company (ISV) and Development Platform (Licensed)
    • Development based on .NET and complies to native platforms (Mono)
    • Xamarin provides up-to-date versions of .NET for iOS and Android
    • Development
    • IDE: Visual Studio 2013 with Xamarin Studio*
    • App Registration: Add Connected Service Wizard
    • SDK Integration: Add Connected Service Wizard
    • When to use
    • Multi-tenant apps or apps that target multiple mobile platforms
    • Development shop looking to leverage existing skills in C# and .NET
    • Want cross-platform with a native UX feel (ie – native controls)
    • Want cross-platform with full access to device capabilities
  23. Xamarin

    Slide 23 - Xamarin

    • Solution Structure
    • Xamrin project templates for device-specific platforms or shared
    • Shared projects use shared portable libraries and device-specific projects (similar to Universal Windows Apps)
    • Xamarin.Forms allows UI layouts to be shared but render native controls across Android, iOS and Windows (can also use native layouts)
    • Debugging
    • Debug Android/Windows with emulators or physical devices
    • Debug iOS w/ remote Mac and Xamarin.iOS (can use emulator or remote/local device)
    • Additional Tips
    • Xamarin binding project allow ADAL/SDK references
    • ADAL v3 can help with binding challenges
  24. Demo

    Slide 24 - Demo

    • Xamarin Development with Office 365
  25. Session Objectives and Takeaways

    Slide 25 - Session Objectives and Takeaways

    • Session Objective(s)
    • Explore development options for building Office 365-enabled mobile applications
    • Demonstrate patterns for authentication, discovery, and operations across mobile SDKs
    • Investigate key decision criteria for selecting a development platform and APIs
    • Illustrate key differences in building native vs. cross-platform mobile apps
    • Key Takeaway(s)
    • The Office 365 APIs provide a consistent pattern for building Office 365-enabled mobile applications
    • Developer SDKs and REST options exist across all the major mobile platforms (Windows, iOS, Android)
    • Visual Studio provides the best experience for Office 365 development, but open platform is key pillar
  26. Questions???

    Slide 26 - Questions???

  27. Developer Program Launch

    Slide 27 - Developer Program Launch

    • http://dev.office.com/devprogram
    • E-mail Newsletters
    • Free Developer Subscription
    • 1 YEAR FREE
    • Free Training
    • Free Tools
    • Webinars
  28. Call to action

    Slide 28 - Call to action

    • Sign up for Developer Program
    • Collect your stickers at //build
    • Check out the express talks