Hands-On Mobile Development with .NET Core
eBook - ePub

Hands-On Mobile Development with .NET Core

Build cross-platform mobile applications with Xamarin, Visual Studio 2019, and .NET Core 3

  1. 504 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Hands-On Mobile Development with .NET Core

Build cross-platform mobile applications with Xamarin, Visual Studio 2019, and .NET Core 3

About this book

Develop native applications for multiple mobile and desktop platforms including but not limited to iOS, Android, and UWP with the Xamarin framework and Xamarin.Forms

Key Features

  • Understand.NET Core and its cross-platform development philosophy
  • Build Android, iOS, and Windows mobile applications with C#, .NET Core, and Azure Cloud Services
  • Bring Artificial Intelligence capabilities into your mobile applications with Azure AI

Book Description

.NET Core is the general umbrella term used for Microsoft's cross-platform toolset. Xamarin used for developing mobile applications, is one of the app model implementations for.NET Core infrastructure.

In this book, you will learn how to design, architect, and develop highly attractive, maintainable, efficient, and robust mobile applications for multiple platforms, including iOS, Android, and UWP, with the toolset provided by Microsoft using Xamarin, .NET Core, and Azure Cloud Services. This book will take you through various phases of application development with Xamarin, from environment setup, design, and architecture to publishing, using real-world scenarios. Throughout the book, you will learn how to develop mobile apps using Xamarin, Xamarin.Forms and.NET Standard; implement a webbased backend composed of microservices with.NET Core using various Azure services including but not limited to Azure App Services, Azure Active Directory, Notification Hub, Logic Apps, and Azure Functions, Cognitive Services; create data stores using popular database technologies such as Cosmos DB, SQL and Realm.

Towards the end, the book will help developers to set up an efficient and maintainable development pipeline to manage the application life cycle using Visual Studio App Center and Visual Studio Services.

What you will learn

  • Implement native applications for multiple mobile and desktop platforms
  • Understand and use various Azure Services with.NET Core
  • Make use of architectural patterns designed for mobile and web applications
  • Understand the basic Cosmos DB concepts
  • Understand how different app models can be used to create an app service
  • Explore the Xamarin and Xamarin.Forms UI suite with.NET Core for building mobile applications

Who this book is for

This book is for mobile developers who wish to develop cross-platform mobile applications. Programming experience with C# is required. Some knowledge and understanding of core elements and cross-platform application development with.NET is required.

Trusted by 375,005 students

Access to over 1.5 million titles for a fair monthly price.

Study more efficiently using our study tools.

Information

Year
2019
Print ISBN
9781789538519
Edition
1
eBook ISBN
9781789530926

Section 1: .NET Core and Cross-Platform Philosophy

.NET Core, .NET Standard, and Xamarin make up the cross-platform toolset for .NET developers. Using these sets of frameworks, developers are able to create applications for various platforms, including but not limited to, iOS, Android, and Universal Windows Platform, as well as IoT devices and Tizen. Understanding how these runtime and framework references work hand in hand and core concepts of cross-platform application will help you to better craft mobile projects.
The following chapters will be covered in this section:
  • Chapter 1, Getting Started with .NET Core
  • Chapter 2Xamarin, Mono, and .NET Standard
  • Chapter 3Universal Windows Platform

Getting Started with .NET Core

.NET Core (previously known as .NET vNext) is the general umbrella term used for Microsoft's cross-platform toolset that aims to solve the shortcomings of centralized/machine-wide frameworks (NET framework) by creating a portable, platform agnostic, modular runtime and framework. This decentralized and modular development platform allows developers to create applications for multiple platforms using the common .NET base class libraries (NET standard), as well as various runtimes and application models, depending on the target platforms. This chapter will give you a brief introduction to .NET Core while explaining different tiers of .NET Core infrastructure. Languages and runtimes, as well as extensions that can be used together with .NET Core will be discussed and analyzed.
The combination of.NET Core, .NET Standard, and Xamarin is the key to cross platform projects, and opens many doors that were previously for Windows-only developers. Creating web applications that can run on Linux machines and containers, and the implementation of mobile applications that target iOS, Android, Universal Windows Platform (UWP), and Tizen are just a couple of examples to emphasize the capabilities of this cross-platform approach.
In this chapter, the following sections will guide you through getting started with .NET Core:
  • Cross-platform development
  • Introduction to .NET Core
  • .NET foundation
  • Developing with .NET Core

Cross-platform development

The term cross-platform application development refers to the process of creating a software application that can run on multiple operating systems. In this book, we will not try to answer the question of why, but how more specifically, will try to create a cross-platform application using the toolset provided by Microsoft and .NET Core.
Before we start talking about .NET Core, let's take a look at the process of developing an application for multiple platforms. Faced with the cross-platform requirement, the product team can choose multiple paths that will lead the developers through different application life cycles.
Throughout this book, we will have hypothetical user stories defined for various scenarios. We will start with an overall user story that underlines the importance of .NET Core:
"I, as a product owner, would like to have the client ShopAcross application running on iOS, Android mobile platforms, as well as Windows, Linux, and macOS desktop runtimes, so that I can increase my reach and user base."
In order to meet these demands, we can choose to implement the application in several different ways:
  • Fully native applications
  • Hybrid applications
  • Cross platform

Developing fully native applications

Following this path would create probably the most performant application, with increased accessibility to the platform APIs for the developers. However, the development team for this type of development would require specific know-how and skill sets so that the same application can be created on multiple platforms, also increasing the developer hours that need to be invested in the application.
Considering the platform set we mentioned previously, we would potentially need to develop the client application in Cocoa and CocoaTouch (macOS and iOS), Java (Android), .NET (Windows), or C++ (Linux), and finally build a web service infrastructure in another language of our choice. In other words, this approach is, in fact, implementing a multi-platform application rather than a cross-platform one.

Hybrid applications

Native hosted web applications (also known as hybrid applications) are another popular choice for (especially mobile) developers. In this architecture, a responsive web application would be hosted on a thin native harness on the target platform. The native web container would also be responsible for providing access to the web runtime on native platform APIs. These hybrid applications wouldn't even need to be packaged as application packages, but as Progressive Web Apps (PWAs) so that users can access them right from their web browsers. While the development resources are even more efficiently used than the native cross-platform framework approach, this type of application is generally prone to performance issues.
In reference to the business requirements at hand, we would probably develop a web service layer and a small Single Page Application (SPA), part of which is packaged as a hybrid application. The other parts can be hosted as a web application.

Native cross-platform frameworks

Development platforms such as React Native, Xamarin, and .NET Core provide the much-required abstraction for the target platforms, so that development can be done using one framework and development language for multiple runtimes. In other words, the developers are still using the APIs provided by the native platform (for example, Android or iOS SDK), but the development is executed in a single language and framework. This approach not only decreases the development resources, but also saves you from the burden of managing multiple source repositories for multiple platforms. This way, the same source is used to create multiple application heads.
For instance, using .NET Core, the development team can implement all target platforms using the same development suite and language, thus creating multiple client applications for each target platform, as well as the web service infrastructure.
In a cross-platform implementation, architecturally speaking, the application is made up of three distinct tiers:
  • Application model (implementation layer for the consumer application)
  • Framework (the toolset available for developers)
  • Platform abstraction (the harness or runtime to host the application)
In this context, we, in essence, are in pursuit of creating a platform-agnostic application layer that will be catered for on a platform abstraction layer. The platform abstraction layer, whether it's on the native web host or the native cross-platform framework, is responsible for providing the bridge between the single application implementation and the polymorphic runtime component.
.NET Core and Mono provide the runtime, while the .NET Standard provides the framework abstraction, which means that cross-platform applications can be implemented and distributed on multiple platforms. ...

Table of contents

  1. Title Page
  2. Copyright and Credits
  3. About Packt
  4. Contributors
  5. Preface
  6. Section 1: .NET Core and Cross-Platform Philosophy
  7. Getting Started with .NET Core
  8. Xamarin, Mono, and .NET Standard
  9. Universal Windows Platform
  10. Section 2: Xamarin and Xamarin.Forms
  11. Developing Mobile Applications with Xamarin
  12. UI Development with Xamarin
  13. Customizing Xamarin.Forms
  14. Section 3: Azure Cloud Services
  15. Azure Services for Mobile Applications
  16. Creating a Datastore with Cosmos DB
  17. Creating Microservices Azure App Services
  18. Using .NET Core for Azure Serverless
  19. Section 4: Advanced Mobile Development
  20. Fluid Applications with Asynchronous Patterns
  21. Managing Application Data
  22. Engaging Users with Notifications and the Graph API
  23. Introducing Cognitive Services
  24. Section 5: Application Life Cycle Management
  25. Azure DevOps and Visual Studio App Center
  26. Application Telemetry with Application Insights
  27. Automated Testing
  28. Deploying Azure Modules
  29. CI/CD with Azure DevOps
  30. Other Books You May Enjoy

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.5M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1.5 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Hands-On Mobile Development with .NET Core by Can Bilgin in PDF and/or ePUB format, as well as other popular books in Computer Science & Bioinformatics. We have over 1.5 million books available in our catalogue for you to explore.