Date post: | 22-Jan-2018 |
Category: |
Technology |
Upload: | amazon-web-services |
View: | 2,137 times |
Download: | 0 times |
© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Presenter:
Tara E. Walker
Technical Evangelist
Amazon Web Services’
Q&A Moderators:
James Montemagno
Technical Evangelist
Xamarin
Karthik SaligramaSoftware Dev Engineer
AWS Mobile
Build Cross-Platform Mobile
Apps with AWS & Xamarin SDKNative Mobile Development with AWS and Xamarin
09/17/2015
Agenda
• Overview of Xamarin Framework
• Intro of AWS Mobile SDK for Xamarin
• Building native cross-platform apps with AWS and
Xamarin
• Q&A
“Not only is native mobile code winning for app
development, but with things like Instant Articles,
native is making the browser-based web look like a
relic even just for publishing articles.”
-John Gruber
http://daringfireball.net/2015/05/facebook_instant_articles
Xamarin Platform Overview
Xamarin Platform
Xamarin platform provides ability to share code across all
platforms.• Target iOS, Android, Windows and Mac with a single C# codebase.
• Use the same language, APIs and data structures on every platform.
Provides native UI, native API access & native performance.
Leverage standard, native user interface controls for desired
platform. • Apps look and behave the native way for the OS platform
Anything you can do in Objective-C, Swift, or Java
can be done in C# and Visual Studio with Xamarin.
Traditional Mobile Development Approach
Silo Approach
• No shared code
• Many languages
• Different development
environments
• Multiple teams for mobile
OS targets
iOS WindowsAndroid
Objective-C
Xcode
C#
Visual
Studio
Java
Android
Studio
Xamarin’s Mobile Development Approach
Unique Approach
• Shared codebase
• 100% Native API access
• High performance
• C# language
• 2.6 billions devices
iOS
Android
Mac
Windows
iOS C# UI Windows C# UIAndroid C# UI
Shared C# Mobile
Coding Options: Xamarin + Xamarin.Forms
Traditional Xamarin Approach With Xamarin.Forms:
More code-sharing, all native
iOS C# UI Windows C# UIAndroid C# UI
Shared C# Backend
Shared UI Code
Shared C# Backend
Intro to AWS Mobile Services
and AWS Xamarin SDK
Introducing the AWS Mobile SDK for Xamarin
AWS Development Support for Xamarin Developers
Provides AWS Services C# Language Support for Xamarin
Part of AWS SDK for .NET
Add the desired NuGet packages to your project references to get started.
Support for Portable Class Library and Xamarin Projects
Portable Class Libraries for use in mobile .NET projects.
Supported environments:
Source Code on GitHub at AWS Labshttps://github.com/aws/aws-sdk-net
Xamarin iOS
Xamarin Android
Windows Store
Windows Phone 8.1
AWS Global Infrastructure (Regions, Availability Zones, Edge Locations)
Core Building
Block Services
Mobile Optimized
Connectors
Mobile Optimized
Services
Your Mobile App, Game or Device App
AWS Mobile SDK, API Endpoints, Management Console
Compute Storage Networking Analytics Databases
Integrated SDK
AWS Mobile Services
Amazon Cognito Amazon Mobile Analytics Amazon SNS Mobile Push
Kinesis Recorder DynamoDB Mapper S3 Transfer Mgr SQS Client SES ClientAWS Lambda
Lambda
Functions
λ
λ
λ
λ
What Our Mobile Customers Have Told Us
Developer’s Mobile App Code
User Identity Mgmt. and Auth
User Data Synchronization
Asynchronous Communication
Active Devices Analytics
User Behavior Analytics
Engagement Analytics
Push Notifications
Event Triggers
Platform agnostic Mobile Backend
Data Validation and Transformation
File and Media Storage
Shared Database Storage
Data Collection
And More….
AWS Cloud Infrastructure
Amazon Cognito
Amazon Mobile Analytics
Amazon SNS Mobile Push
Amazon Lambda New!
Mobile-optimized Connectors(Kinesis, S3, DynamoDB, SQS)
Amazon Cognito Identity
Identity
Providers
Unique
Identities
Any
Device
Any
Platform
Joe Anna Bob
Mobile
AnalyticsS3 DynamoDB Kinesis
Any
AWS
Service
Support Multiple Login ProvidersEasily integrate with major login providers for
authentication.
Unique Users vs. DevicesManage unique identities. Automatically
recognize unique user across devices
and platforms.
Amazon Cognito Sync
Store App Data, Preferences
and StateSave app and device data to the cloud
and merge them after login
Cross-device Cross-OS Sync Sync user data and preferences across
devices with one line of code
Work OfflineData stored in local SQLite DB first. Works
seamlessly when intermittent or no
connectivity
User Data
Storage and
Sync
Any Platform
iOS/Android/FireOS
Windows Phone (w/.NET SDK)
key/value
data
Identity pool
Amazon Simple Storage Service (S3)
Amazon S3 Transfer Manager• Makes it easy to access S3 from Mobile Apps
while optimizing for performance and reliability
• Hides complexity behind a simple API
• Pause, resume, cancel functions
• Track Progress
• Multipart upload
What is Amazon S3• Storage for the internet
• Highly-scalable, reliable, and low-
latency data storage infrastructure at
very low costs
• Store any kind of data in any format
Jo
e
Anna Bo
b
High
Scores
Joe 1500
Anna 800
Bob 750
Amazon DynamoDB
Amazon DynamoDB Object Mapper • Simplifies access to Amazon DynamoDB in
you app
• Map client-side classes to Amazon
DynamoDB tables
• Removes the need to transform objects into
tables and vice versa.
What is Amazon DynamoDB• Fully managed NoSQL database service
• Provides fast and predictable performance
• Seamless scalability
• Low Latency
• Zero administration overhead
AWS Lambda
What is AWS Lambda• Event-Driven Compute in the Cloud
• Stateless, request-driven code execution via AWS Lambda
functions
• Triggered by events or state transitions in other AWS services
or your custom events i.e. File uploaded to S3
AWS Lambda Mobile Backend • Makes it easy to asynchronously transform, process
retrieve data as it reaches the cloud or as events trigger
• Perform data-driven auditing, analysis, and notification
• Kick off workflows
With Amazon SNS, developers can send push notifications on multiple
platforms and reach mobile users around the world
New features:
Message Expiry Time
Message Attributes
Amazon SNS Mobile Push
Amazon SNS
Cross-platform
Mobile Push
Internet
Apple APNS
Google GCM
Amazon ADM
Windows WNS
and MPNS
Baidu CP
Android Phones and Tablets
Apple iPhones and iPads
Kindle Fire Devices
Android Phones and Tablets in
China
iOS
Windows Desktop and Windows
Phone Devices
What is Amazon SNS?• Managed Push Notification Service
• Send individual messages or fan-out
messages to large numbers of
recipients.
SNS Mobile Push • Send notifications to Apple, Google, Fire
OS, Windows devices, and Android
devices in China with Baidu Cloud Push
• Messages sent to a mobile endpoint can
appear in the mobile app as message
alerts, badge updates, or even sound
alerts.
Demo: MyRestaurant
AWS and Xamarin Resources
AWS Xamarin Developer Guide
https://docs.aws.amazon.com/mobile/sdkforxamarin/developerguide/index.html
Xamarin Developer Guides
https://developer.xamarin.com/
AWS Mobile Services
http://aws.amazon.com/mobile
AWS Xamarin GitHub Samples
https://github.com/awslabs/aws-sdk-net-samples
Xamarin GitHub Samples
https://github.com/xamarin/xamarin-forms-samples
https://github.com/xamarin/monotouch-samples
https://github.com/xamarin/monodroid-samples
Q&A
Tara E. Walker
Technical Evangelist
@taraw