Friday, October 11, 2013

Async & Await in C# with Xamarin

One of the great things about the .NET Framework is that Microsoft has worked long and hard to improve many features. Since the initial release of .NET 1.0, there has been support for threading via .NET threads as well as an application-level threadpool. This provided a great starting point when compared to Visual Basic 6 and classic ASP programming. The release of.NET 4 brought significant improvements in the area of threading, asynchronous operations and parallel operations. While the improvements made working with asynchronous operations easier, new problems were introduced, since many of these operations work based on callbacks. For example:
  • How should a developer handle error checking?
  • The program flow tends to be non-linear. Fixing bugs can be problematic.
  • It is hard for a developer to get an understanding of what is happening within an application.
This article will look at how Xamarin has implemented the .NET 4.5/C# 5 support into their Xamarin.iOS and Xamarin.Android productions. There are three general areas that I'll focus on:
  • A general look at the asynchronous support in Xamarin's mobile products. This includes async, await, and the implications that this has for cross-platform code.
  • The new HttpClient class that is provided in .NET 4.5/Mono 3.2.
  • Xamarin's extensions for asynchronous operations for Android and iOS.
FYI: Be aware that sometimes the OpenWeatherMap API breaks, for no reason.  I found this out after I shipped the article in.

Thursday, October 10, 2013

What's new in Xamarin and iOS7 - webinar

I recently did an online webinar regarding the new iOS7 and Xamarin.  In it, I covered the basics of what is new in iOS7 along with what is new in Xamarin's developer platform.  Please take some time and view this webinar.  The items that were covered include:
  • What's new in iOS7.
  • The XCode Design Surface.
  • An example showing new iOS7 View Animations.
  • What's new with Xamarin and async, await, and HttpClient.
  • A demo of Razor Templating.
  • The Xamarin.iOS Plugin for Visual Studio.
  ** The video only works in Windows.  I don't control the content, so I have to go with what I am given. :-( **