Upload
quorralyne
View
866
Download
0
Embed Size (px)
Citation preview
Hitchhiker's Guide to Using Xamarin with RESTful ServicesHeather Downing
Intro
Heather Downing
❖ Technical focus in .Net & mobile apps
❖ Experience working with Fortune 500 companies
❖ Speaker and entrepreneur
❖ Horseback Archery Competitor
❖ Tolkien Enthusiast
❖ Avid Star Trek TNG Fan
Content1. Environment Preparation
2. DEMO: Running Xamarin Forms with Emulators
3. The Xamarin Forms Approach
4. DEMO: Consuming a REST Service
5. REST API Overview
6. DEMO: Publishing your Web API Project to Azure
7. Additional Thoughts
What you will accomplish...❖Jumpstart into working with the Xamarin Studio IDE
❖Run basic app with Xamarin Android Player and/or xCode emulators
❖Connect to an existing third party REST API with existing app
❖Creation of a very simple Xamarin Forms application from scratch
❖Publish a completed Web API project to Azure (inside Visual Studio)
❖Connect to your REST service with your Xamarin Forms app
Environment Preparation
DEMO: Emulators
xCode iOS Simulator
http://developer.apple.com/
xcode/
The Xamarin Forms Approach
“Xamarin Forms is a very clever and one might say, elegant, solution to the Write Once, Run Anywhere, AND Don't
Suck problem.”
- Scott Hanselman
DEMO: Consuming REST
Xamarin TodoREST App
https://developer.xamarin.com/samples/xamarin-forms/WebServices/TodoREST/
REST API Overview
Todo REST APIRequires BASIC AUTHENTICATION (Requires Username & Password)
Provides CRUD endpoints for Todo Items
Might benefit from adding machine documentation such as Swagger to more easily visualize Request and Response objects
Hosted on Azure Mobile App Service
Not currently connected to any database
Xamarin TodoREST Service
https://github.com/xamarin/xamarin-forms-samples/tree/master/WebServices/TodoREST/
TodoRESTService
DEMO: Publishing API
Swagger (Swashbuckle
for .Net)https://github.com/domaindrivendev/
Swashbuckle
http://swagger.io/
Additional Thoughts
“A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of
complete fools.”- Douglas Adams, ‘Hitchhiker’s Guide to the Galaxy’
ResourcesWeb Services Overview: https://developer.xamarin.com/guides/cross-platform/application_fundamentals/web_services/
Consuming RESTful services Using Xamarin Forms: https://developer.xamarin.com/guides/xamarin-forms/web-services/consuming/rest/
Xamarin and Cloud Connected Apps: https://www.youtube.com/watch?v=qIr8xYSTv-I
YouTube Xamarin with REST Presentation: https://www.youtube.com/watch?v=VfoJCd_TMx0
YouTube - Xamarin with REST Presentation: https://www.youtube.com/watch?v=VfoJCd_TMx0
Common Pitfalls in Xamarin Apps: https://university.xamarin.com/guestlectures/avoiding-common-pitfalls-in-xamarin-apps
Azure Mobile Service with Xamarin: https://azure.microsoft.com/en-us/documentation/articles/app-service-mobile-xamarin-forms-get-started/
Xamarin Forms HttpClient code on Github: https://github.com/conceptdev/xamarin-forms-samples/tree/master/HttpClient
Guide on REST Authentication: https://developer.xamarin.com/guides/xamarin-forms/web-services/authentication/rest/
Example App: https://developer.xamarin.com/samples/xamarin-forms/WebServices%5CTodoREST/
Example App REST Service: https://github.com/xamarin/xamarin-forms-samples/tree/master/WebServices/TodoREST/TodoRESTService
Remember...One bite at a time, you can
devour this robust and impressively powerful
framework, and serve it to all mobile users on a silver
platter.
So long and thanks for all the fish.Presentation Download:http://www.slideshare.net/quorralyne/
Heather Downing