Azure and Xamarin Forms: Cross Platform Mobile Development
()
About this ebook
Discover how to create cross platform apps for Android, iOS and UWP using Azure services and C# with Xamarin Forms. This book illustrates how to utilize Azure cloud storage for serving up Azure SQL DB data through Azure App Services.
The book starts by setting up Xamarin and introducing Xamarin Forms and then covers the Azure Portal from a developer’s perspective and goes on to demonstrate how to build an Azure Service using Quickstart. You'll also see how to add Azure support to Xamarin Forms application. You'll review in detail how to build a Xamarin Form with Azure Client and modify an existing app to become a Xamarin Forms Client for Azure with offline synchronization.
You then move on to third-party controls that speed up development. By the end of the book, you will be able to use Azure and Xamarin together and master how to use Azure Mobile Quickstarts, Azure SQL plumbing, database synchronization and Xamarin Forms.
What You'll Learn
- Create a Xamarin Forms App and understand the Structure of a Xamarin Forms App.
- Navigate pages and use platform specific coding.
- Use images, ListView and the Azure Mobile App Quickstart to build a Service and Xamarin Forms app
- Modify an existing app to use Azure Client Libraries, understand offline storage with SQLite and incorporate offline synchronization
Who This Book Is For
Software developers new to Xamarin and/or Azure and for the developers who are familiar with both the technologies to use in mobile apps.
Related to Azure and Xamarin Forms
Related ebooks
Building Xamarin.Forms Mobile Apps Using XAML: Mobile Cross-Platform XAML and Xamarin.Forms Fundamentals Rating: 0 out of 5 stars0 ratingsBeginning Xamarin Development for the Mac: Create iOS, watchOS, and Apple tvOS apps with Xamarin.iOS and Visual Studio for Mac Rating: 0 out of 5 stars0 ratingsMastering Xamarin.Forms Rating: 3 out of 5 stars3/5Xamarin 4.x Cross-Platform Application Development - Third Edition Rating: 0 out of 5 stars0 ratingsPractical Flutter: Improve your Mobile Development with Google’s Latest Open-Source SDK Rating: 0 out of 5 stars0 ratingsBeginning Power Apps: The Non-Developer's Guide to Building Business Applications Rating: 0 out of 5 stars0 ratingsTop 10 Xamarin Tips and Traps Rating: 0 out of 5 stars0 ratingsFlutter for Jobseekers: Learn Flutter and take your cross-platform app development skills to the next level (English Edition) Rating: 0 out of 5 stars0 ratingsXamarin.Forms Solutions Rating: 0 out of 5 stars0 ratingsComputer Programming: From Beginner to Badass—JavaScript, HTML, CSS, & SQL Rating: 3 out of 5 stars3/5Monetizing Machine Learning: Quickly Turn Python ML Ideas into Web Applications on the Serverless Cloud Rating: 0 out of 5 stars0 ratingsPractical Salesforce Development Without Code: Building Declarative Solutions on the Salesforce Platform Rating: 0 out of 5 stars0 ratingsPractical hapi: Build Your Own hapi Apps and Learn from Industry Case Studies Rating: 0 out of 5 stars0 ratingsExploring Blazor: Creating Hosted, Server-side, and Client-side Applications with C# Rating: 0 out of 5 stars0 ratingsBuilding Single Page Applications in .NET Core 3: Jumpstart Coding Using Blazor and C# Rating: 0 out of 5 stars0 ratingsSwift Quick Syntax Reference Rating: 0 out of 5 stars0 ratings.NET DevOps for Azure: A Developer's Guide to DevOps Architecture the Right Way Rating: 0 out of 5 stars0 ratingsSalesforce Platform App Builder Certification: A Practical Study Guide Rating: 0 out of 5 stars0 ratingsBuild Your Own IoT Platform: Develop a Fully Flexible and Scalable Internet of Things Platform in 24 Hours Rating: 0 out of 5 stars0 ratingsWeb Applications with Elm: Functional Programming for the Web Rating: 0 out of 5 stars0 ratingsThe Essential Guide to HTML5: Using Games to Learn HTML5 and JavaScript Rating: 0 out of 5 stars0 ratingsJavaScript Frameworks for Modern Web Development: The Essential Frameworks, Libraries, and Tools to Learn Right Now Rating: 0 out of 5 stars0 ratingsVisual Studio Condensed: For Visual Studio 2013 Express, Professional, Premium and Ultimate Editions Rating: 0 out of 5 stars0 ratingsDevOps for SharePoint: With Packer, Terraform, Ansible, and Vagrant Rating: 0 out of 5 stars0 ratingsUltimate Ember.js for Web App Development Rating: 0 out of 5 stars0 ratingsMastering Google App Engine Rating: 0 out of 5 stars0 ratingsLearning Bulma: Understand How to Develop Responsive, Mobile-first Websites Using This Impressive, Modern Framework Rating: 0 out of 5 stars0 ratings
Programming For You
Python: Learn Python in 24 Hours Rating: 4 out of 5 stars4/5Java for Beginners: A Crash Course to Learn Java Programming in 1 Week Rating: 5 out of 5 stars5/5Excel : The Ultimate Comprehensive Step-By-Step Guide to the Basics of Excel Programming: 1 Rating: 5 out of 5 stars5/5HTML & CSS: Learn the Fundaments in 7 Days Rating: 4 out of 5 stars4/5Coding All-in-One For Dummies Rating: 4 out of 5 stars4/5Python: For Beginners A Crash Course Guide To Learn Python in 1 Week Rating: 4 out of 5 stars4/5SQL: For Beginners: Your Guide To Easily Learn SQL Programming in 7 Days Rating: 5 out of 5 stars5/5SQL All-in-One For Dummies Rating: 3 out of 5 stars3/5Learn SQL in 24 Hours Rating: 5 out of 5 stars5/5Python Programming : How to Code Python Fast In Just 24 Hours With 7 Simple Steps Rating: 4 out of 5 stars4/5Learn JavaScript in 24 Hours Rating: 3 out of 5 stars3/5Grokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5Python Machine Learning By Example Rating: 4 out of 5 stars4/5SQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5TensorFlow in 1 Day: Make your own Neural Network Rating: 4 out of 5 stars4/5PYTHON: Practical Python Programming For Beginners & Experts With Hands-on Project Rating: 5 out of 5 stars5/5Photoshop For Beginners: Learn Adobe Photoshop cs5 Basics With Tutorials Rating: 0 out of 5 stars0 ratingsModern C++ for Absolute Beginners: A Friendly Introduction to C++ Programming Language and C++11 to C++20 Standards Rating: 0 out of 5 stars0 ratingsPython QuickStart Guide: The Simplified Beginner's Guide to Python Programming Using Hands-On Projects and Real-World Applications Rating: 0 out of 5 stars0 ratingsHTML in 30 Pages Rating: 5 out of 5 stars5/5Programming Arduino: Getting Started with Sketches Rating: 4 out of 5 stars4/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5Mastering Windows PowerShell Scripting Rating: 4 out of 5 stars4/5Python Essentials Rating: 5 out of 5 stars5/5
Reviews for Azure and Xamarin Forms
0 ratings0 reviews
Book preview
Azure and Xamarin Forms - Russell Fustino
© Russell Fustino 2018
Russell FustinoAzure and Xamarin Formshttps://doi.org/10.1007/978-1-4842-3561-4_1
1. Installing Visual Studio 2017
Russell Fustino¹
(1)
New Port Richey, Florida, USA
In this chapter, you will learn how to install Visual Studio 2017, which will be used to complete the examples in this book.
Note
The source code and assets for this book can be downloaded from https://github.com/Apress/azure-and-xamarin-forms
Installing Visual Studio 2017 and Tools on Windows
This chapter covers how to install the required products to complete all the examples in this book.
Windows 10 Pro or higher is required to run the emulators and cross platform development for iOS, Android, and Universal Windows Platform (UWP).
Download and install Visual Studio Community 2017 or later versions, available at www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community.
Select and install the UWP development workload, (Figure 1-1) under the Windows section, and Mobile development with .NET.
Select the .NET (cross platform development using Xamarin) option, under the Mobile & Gaming section (Figure 1-2) on the Visual Studio (VS) 2017 Installer.
../images/462945_1_En_1_Chapter/462945_1_En_1_Fig1_HTML.jpgFigure 1-1
Select Universal Windows Platform development
../images/462945_1_En_1_Chapter/462945_1_En_1_Fig2_HTML.jpgFigure 1-2
Select Mobile development with .NET
Install ASP.NET and web development ➤ Azure development under the Web & Cloud section (Figure 1-3).
../images/462945_1_En_1_Chapter/462945_1_En_1_Fig3_HTML.jpgFigure 1-3
Select ASP.NET and web development ➤ Azure development
Install Data storage and processing, under the same section (Figure 1-4).
../images/462945_1_En_1_Chapter/462945_1_En_1_Fig4_HTML.jpgFigure 1-4
Select Data storage and processing
Under the Individual components tab, under the Emulators section, check off the following (Figure 1-5):
Google Android Emulator (global)
Intel Hardware Accelerated Execution Manager (global)
Visual Studio Emulator for Android
All Windows 10 Mobile Emulator (Anniversary Edition AND Creators Update)
If you do not see Google Android Emulator listed, this means that you do not have Hyper-V enabled. See Chapter 2 for how to enable Hyper-V. In the meantime, start the install.
../images/462945_1_En_1_Chapter/462945_1_En_1_Fig5_HTML.jpgFigure 1-5
Select Google Android Emulator (global), Intel Hardware Accelerated Execution Manager (global), Visual Studio Emulator for Android, and Windows 10 Mobile Emulator (Anniversary Edition and Creators Update)
Installing Visual Studio 2017 and Tools on the Mac
Optionally, install Visual Studio for the Mac. The purpose for a Mac installation would be to run, test, and deploy iOS and Android versions of your app in a Mac environment (UWP not supported). To build iOS apps on a PC, you must be wired to a Mac on the same network. Most of the examples in this book will use either the Android emulator or UWP local machine on a PC, so the Mac install is optional for the book. Instructions are available at https://developer.xamarin.com/guides/ios/getting_started/installation/mac/ .
Other Tools
Postman (www.getpostman.com and install)
SQL Server Management Studio (https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms). This tool will be used to verify our database contents.
Firefox (www.mozilla.org/firefox/new/). Firefox has a nicely formatted view when looking at JSON data coming back from a web service.
Summary
In this chapter, you learned how to install Visual Studio 2017, which will be used to complete the examples in this book, and some other tools, such as Postman, SQL Server Management Studio, and Firefox. Visual Studio for the Mac is an optional installation. In the next chapter, we will build a Xamarin Forms app.
© Russell Fustino 2018
Russell FustinoAzure and Xamarin Formshttps://doi.org/10.1007/978-1-4842-3561-4_2
2. Introduction to Xamarin Forms
Russell Fustino¹
(1)
New Port Richey, Florida, USA
Xamarin Forms is an awesome cross platform environment from which to build iOS, Android, and UWP apps, as well as other potential platforms in the future.
Project Overview
In this chapter, you’ll get your feet wet with Xamarin Forms via five projects. Each project builds on the prior one. Several topics will be covered in this introductory chapter, including how to create a Xamarin Forms solution, as well as emulator tips, navigation, images, event handlers, device form factors, and list views. The result will be a typical app with a main navigation page, a list view page, and a detail page that you can use as a template for building future apps! We will be creating a book list project that has a main navigation page that looks like that in Figure 2-1.
../images/462945_1_En_2_Chapter/462945_1_En_2_Fig1_HTML.jpgFigure 2-1
Main navigation page in the completed project
It has a list view page that looks like that in Figure 2-2.
../images/462945_1_En_2_Chapter/462945_1_En_2_Fig2_HTML.jpgFigure 2-2
ListView page in the completed project
The app will navigate to a detail page on the Apress site for the book selected from a list such as that in Figure 2-3.
../images/462945_1_En_2_Chapter/462945_1_En_2_Fig3_HTML.jpgFigure 2-3
Detail page in the completed project
We’ll first create a new Xamarin Forms application and review the structure of the solution. We’ll then run the application for Android, UWP, and, optionally, iOS, if connected with a Mac server. As this is a cross platform app, you can use any mix of the platform projects, depending on your development environment (Mac or Windows).
We will then enhance the app, to have a main navigation page, with StackLayout and GridLayout, which considers device form factors for phones and tablets, using device-specific logic.
We will use XAML and code behind to control your layout form factors for tablets and phones.
We will also use embedded resource images of the MainPage.
A ListView page will be added with a selection event handler. You can also run these examples on Visual Studio (VS) for Mac; however, this does not support UWP.
Note
Run all the exercises in this book from your laptop/PC and not an Azure virtual machine.
Time Estimate
70 Minutes