NXT
Blog

Read our latest news articles from the NXT Digital Solutions team.

.NET "MAUI," Microsoft's new .NET Multi-platform App UI

by Chris Hall Senior Developer

 Posted on January 12, 2021

A brief history of smartphones

Although the modern era of Apps and Smartphones didn’t really begin until after the launch of the iPhone in 2007, smartphones and their predecessors have been with us for over 2 decades now. At the turn of the century, Microsoft had released “Pocket PC 2000” designed to run on PDA’s (Personal Digital Assistants, the forerunner to the smartphone – albeit with the phone part missing) which later renamed to “Windows Mobile” in 2003.

My first smartphone was an Orange SPV running Windows Mobile. I remember my excitement being able to run a terrible “Sonic the Hedgehog” emulation in full colour on a phone! At the time it really felt like the future had arrived.

In reality however, they were clunky, expensive and unstable and outside of their use for business there was no widespread adoption - they remained solely as toys for geeks like myself who lurked on the xda-developers forum. The term “App” had yet to be coined, we still referred them as “Programs”.

When Apple released the iPhone though, everything changed. They had put together a well designed and appealing consumer device, with a well though out ecosystem and sophisticated development tools. Add to this a curated and vetted platform for distribution, the App Store. (“There’s an app for that!”). The modern app was born.

There were many pretenders to the crown in the late noughties. Version 1 of Google’s Android platform launched in 2008 and the short-lived Palm Pre (launched in 2009) was a fantastic device that suffered at the lack of developer uptake.

By the early 2010’s it had become apparent that iOS and Android were the main players that were here to stay.

Modern app development

The new iPhone / Android app market was lucrative but there were many barriers to entry. To take your app to market on both platforms meant developing two versions of your app side by side, using separate toolsets and languages. This made development costly and inefficient, implementing new functionality meant doing everything twice, with differing implementations to suit the needs and capabilities of the different device families.

The holy grail for developers was to be able to write and maintain a single codebase, that would run across multiple platforms and standardize UI development and native functionality access.

If you build it, they will come

The tech world stepped up to this challenge, and we began to see cross platform frameworks released in order to bridge the gap between platforms.

There were many flavours of these frameworks, each with their own take on how this could be achieved. A popular early framework “PhoneGap” (now Apache Cordova) tried to solve the problem by allowing developers to write HTML5 applications with a standardized interface to native phone functionality, such as GPS and Accelerometers.

Indeed, several other frameworks took this hybridized web-with-native approach, but it came with its downsides. Using an embedded web browser to develop and deliver the UI came with a performance hit – and after a while it became all too obvious that there were not native apps.

You could easily tell a native app from an app developed with a cross platform web framework, just from using it. Native apps had an elegance and sophistication to their UI – with fast smooth framerates and animations that were unmatched by the hybrid counterparts.

There must be another way?

And there was. A San Francisco based company called Xamarin launched in 2011 and had been developing their solution – “Mono”. Mono allowed developers to write native Android and iOS apps using a shared C# / .NET based codebase.

It still had its drawbacks, the UI components of the framework still had to be developed on a per-platform basis, but it rid the developers of the need to write code in multiple languages and on multiple machines – everything was encapsulated into the C# language.

Fast forward to 2014 and Xamarin Forms was released. Xamarin Forms allowed developers to write a single UI using portable controls subsets that were mapped to native controls of Android, iOS and Windows Phone.

For developers, the holy grail was getting closer!

Microsoft saw the potential here and acquired Xamarin in early 2016, putting their full weight behind the framework. Microsoft announced that they would open-source the Xamarin SDK and bundle it as a free tool within Visual Studio – Microsoft’s integrated development environment.

As a specialist .NET Agency, the adoption of Xamarin for NXT was a no-brainer. We could apply our years of experience and familiarity with the .NET ecosystem and use this to fast-track cross platform app development with native-feeling UI.

As time goes by…

The late 2010’s saw rapid growth in the cross-platform development framework market. Other big players launched their solutions – such as Facebook’s React Native and Google’s Flutter.

Now, as a developer – there has never been so much choice when starting a new app build for a client.

That’s not to say everything is perfect – each of the offerings has it’s own quirks, upsides and downsides - and for graphically and functionally complex apps – there’s still no beating full native.

Keeping up with the Jones’

As we all know, competition drives innovation – and the same rings true with cross-platform app development frameworks.

Not being one to stagnate, and with the recent launch of .NET 6 previews - Microsoft announced the upcoming launch of “MAUI”, at the Build 2020 (virtual) developer conference.

.NET Multiplatform App UI (MAUI)

MAUI represents the next step for Xamarin Forms. Refining the heart of the product, speeding up UI rendering, engaging in consistent design processes, and expanding from smartphone to desktop.

Microsoft says it's "the evolution of Xamarin.Forms extended from mobile to desktop scenarios with UI controls rebuilt from the ground up for performance and extensibility."

MAUI promises to deliver enhancements in several key areas.

Performance

Significant progress has been made with Ahead-of-Time (AOT), startup tracing and fast renderers. There are many enhancements in .NET MAUI that will boost performance, especially .NET 6 itself.

The new architecture flips the relationship between framework and it’s target platform. Platform controls now only need to handle the needs of the framework – which is not only more efficient in terms of performance but simplifies customization of the core components – something which in Xamarin Forms had been somewhat of a pain point.

Design

.NET MAUI enables app themes through styling for Fluent UI and Material Design, filling out the existing controls with the necessary styling APIs and visual states, and adding support for control templates.

Microsoft have also teased a new Visual strategy under development that uses a combination of native controls and drawn controls, stating “For customers needing the 1:1 design across platforms and looking for even better performance, but also having a requirement for native platform support, we think this will be on target.”

Platforms

In .NET 6, .NET MAUI embraces Android, iOS, macOS, and Windows. This is particularly exciting as it means Apps can scale beyond phones and tablets – into fully fledged desktop applications.

Several experiences have been unified, such as fonts and image management, as part of this experience, and reducing dependency on the difficulty of handling numerous platform projects.

Things can only get better

As a specialist .NET development agency, it’s hard not to get excited by the upcoming MAUI release, scheduled for November 2021. It promises to further simplify and streamline development whilst expanding on performance what is possible.

As a developer, is this the holy grail platform? Well, that is subjective – and the goal is constantly moving, but certainly this is closer to it that we have ever been before!


About the Author

author

Chris leads our front end development at NXT, principally involved in all things responsive, animation and anything cool you see on the web. Chris loves nothing more than creating jQuery libraries but when he's not in the office he loves spinning Poi, making his own tunes and the Linton travel tavern. Keep your eyes peeled for "Spinjammin" - coming soon. 


Tags
  • Xamarin
  • .NET 6
  • .NET MAUI
  • App Development
  • Mobiles Apps
  • IOS Apps
  • Android Apps
  • Microsoft