iOS and Android developers: Microsoft's Blazor for building mobile apps gains traction

Microsoft is heading for a single UI framework for everything from web apps to native desktop and mobile apps.
Written by Liam Tung, Contributing Writer

Microsoft's latest experimental release of its Mobile Blazor Bindings appears to be hitting the right note with .NET developers building native apps for iOS and Android.

After announcing the new experimental Blazor toolkit for building web apps to create native iOS and Android apps, Microsoft earlier this month released another version with more features for web developers who are building mobile apps.  

Microsoft initially released the mobile bindings toolkit to gauge whether developers would like to use the "Blazor-style programming model with Razor syntax and features", as opposed to using XAML and Xamarin.Forms. 

The open-source project caters to web developers who want to use familiar patterns but use C# and .NET instead of JavaScript to create interactive web user interfaces. 

SEE: Six in-demand programming languages: Getting started (free PDF)

The mobile bindings help these developers build native mobile apps for iOS and Android, with the underlying UI components of Mobile Blazor Bindings being based on Xamarin.Forms from Microsoft's cross-platform mobile app development product for .NET and C#, Xamarin. 

The February update, preview 2, includes new BoxView, CheckBox, ImageButton, ProgressBar, and Slider components for building key parts of a native mobile app's user interface.     

Additionally, Xamarin.Essentials is now in the project template, offering developers cross-platform application programming interfaces (APIs) for mobile apps that help create calls to get geolocation data, device status, clipboard access and more.  

Mobile Blazor Bindings' default components, such as button and label properties, are now more aligned with Xamarin.Forms UI controls. 

While the mobile bindings project is still considered experimental, it is encouraging for fans of Blazor that Microsoft appears set to update it regularly and fix bugs. 

Microsoft has previously demonstrated how Blazor can be used to build all types of apps, including server-based web apps, offline web apps with WebAssembly, progressive web apps, hybrid .NET native apps that render to Electron and work offline, as well as native desktop and mobile apps.  

Blazor fan Chris Sainty, a UK-based developer, has posted a helpful explanation of Blazor on the Stack Overflow blog. He details what sets Blazor and its mobile bindings apart from other popular JavaScript UI frameworks, such as Angular and ReactJS, and how it leans towards web developers' existing work processes. 

"By using different renderers Blazor is able to create not only web based UIs, but also native mobile UIs as well," he notes. 

"This does require components to be authored differently, so components written for web renderers can't be used with native mobile renderers. However, the programming model is the same. Meaning once developers are familiar with it, they can create UIs using any renderer."

SEE: Web developers: Microsoft Blazor lets you build native iOS, Android apps in C#, .NET

At the moment, the only renderer that has reached general availability is the Blazor Server remote renderer for building apps for the web. The Blazor WebAssembly renderer is still in preview, while the Electron renderer and Mobile Blazor Bindings are still experimental, meaning Microsoft hasn't made a commitment to their future development. 

Sainty is optimistic about what a single UI framework for all types of .NET applications means for .NET developers. 

"If all the current hosting models for Blazor move into production, and right now I can't see why they wouldn't, developers will have the option to learn a single programming model, which they can use to create UIs anywhere. This is a big deal," he writes.  

Editorial standards