Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Cross-Platform Development with Xamarin

You're reading from   Mastering Cross-Platform Development with Xamarin Master the skills required to steer cross-platform applications from drawing board to app store(s) using Xamarin

Arrow left icon
Product type Paperback
Published in Mar 2016
Publisher
ISBN-13 9781785285684
Length 390 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Toc

Table of Contents (14) Chapters Close

Preface 1. Developing with Xamarin FREE CHAPTER 2. Memory Management 3. Asynchronous Programming 4. Local Data Management 5. Networking 6. Platform Extras 7. View Elements 8. Xamarin.Forms 9. Reusable UI Patterns 10. ALM – Developers and QA 11. ALM – Project and Release Management 12. ALM – App Stores and Publishing Index

Patterns and best practices

It is possible to draw parallels with and even convert from the classic threading and eventing patterns while implementing asynchronous tasks. However, async methods have to be implemented with caution to avoid deadlocks and uncaught exceptions.

Async pattern conversions

The Observer pattern—also known as the Event-based Asynchronous Pattern (EAP)—used to be the main development tool for long running processes and service/remote application APIs. Events and delegates still make up a considerable amount of UI-related implementation in modern applications.

However, asynchronous tasks and awaitables provide a much more convenient way to deal with long running processes and chain completion methods.

Fortunately, it is possible to implement conversion patterns from other async patterns to task-based implementations. These types of scenarios involve using the TaskCompletionSource class.

In order to demonstrate this, we will be using a simplified version of...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image