Upload
pranav-ainavolu
View
93
Download
0
Embed Size (px)
Citation preview
Starting Mobile Development
Pranav AinavoluMicrosoft MVP | Developer @ RealPage, Inc.
@a_pranav | http://pranavon.net/
Demo Architecture
Portable Models & Code Services
Portable View Models
Portable UI based on Xamarin.Forms
UWPAndroid iOS
Shared code
Android
DemoNew Project Foundation
Portable Models & Code Services
Portable View Models
Foundation• Models & Base Services• Models• Services & Business logic• Platform-specific service
Interfaces• Architectural Services
• Object repository for IoC/DI• Command class
• View Models• Architectural Services
• Base View Model class• Core View Models Portable Models & Code Services
Portable View Models
DemoAdding the Platform Layers
Portable Models & Code Services
Portable View Models
Portable UI based on Xamarin.Forms
UWPAndroid iOS
Shared code
Shared vs. Portable Class Library Projects• Code in a shared project compiles as if it
is part of each project that references it• Therefore, code must be valid in all
referencing projects but can use #ifdef directives to compartmentalize platform-specific code regions if necessary
• Alternatively, Portable Class Libraries are separate referenced assemblies targeting a lowest common denominator across specified platforms
• Both may call injected ‘service’ objects• PCL may be succeeded by the .NET
Standard library for new projects later in 2017 Portable Models & Code Services
Portable View Models
Portable UI based on Xamarin.Forms
UWPAndroid iOS
Shared code
Cloud Services• Azure Storage
• Blob – REST-based• Queue• File – SMB sharing• Disk
• Azure App Service Mobile Apps• Data store with offline sync• REST-based API end points to data or coded functions built with C# or
node.js• Authentication available against corporate or personal identity providers
• Many other services for large data, IoT, notifications, logic flow, BI, etc.
DemoConnecting to the Cloud
Portable Models & Code Services
Portable View Models
Portable UI based on Xamarin.Forms
UWPAndroid iOS
Shared code
NuGet client library package integration• REST-based Azure Storage
client libraries available as a NuGet package for portable class libraries• Azure App Service Mobile App
client with SQLite libraries operate at head-level projects, injected into lower-level code with interfaces
Portable Models & Code Services
Portable View Models
Portable UI based on Xamarin.Forms
UWPAndroid iOS
Shared code
DemoSecuring Cloud Access
Shared Access Signature• Azure App Service Mobile App code has access to a key
for Azure Storage, which is used to generate temporary Shared Access Signatures (SAS) for Azure Storage blob operations.• That code is exposed as a custom REST-based API end
point• The mobile app calls the custom API end point to get a
SAS• The SAS is for a specific resource, specific operation and
for a duration• Can also secure custom end points with identity
providers
DemoCompleting the Shared UI
Portable Models & Code Services
Portable View Models
Portable UI based on Xamarin.Forms
UWPAndroid iOS
Shared code
DemoUsing a Native UI
Portable Models & Code Services
Portable View Models
Portable UI based on Xamarin.Forms
UWPAndroid iOS
Shared code
Android
Resources• Further sessions in this series:
• Practical Mobile Development – consistent UI using Forms, incorporating DevOps, hands-on lab
• Learn about Xamarin - https://www.xamarin.com/platform • Get started for free on Mac & PC - https://store.xamarin.com/• The Xamarin Show -
https://channel9.msdn.com/Shows/XamarinShow • Xamarin University - https://www.xamarin.com/university