Microsoft Positions UWP for Line of Business Applications

Microsoft is positioning UWP for traditional line of business (LOB) applications with an emphasis on rapid application development (RAD) using the Windows Template Studio. But that’s not all they’re doing to entice LOB developers onto the UWP platform.

When it was originally released, the Universal Windows Platform (UWP) was seen solely as a way to sell applications through the Windows Store. The basic idea was you could write an application once and it would run on both Windows and Windows Phone. But it was also severely restricted, such that you almost had to go through the Windows Store. This made it untenable for Line of Business (LOB) applications, which naturally should never be exposed to the public.

In lieu of UWP, LOB developers either continued using “legacy” platforms such as WinForms and WPF, usually with ClickOnce as the deployment method. Or they accepted the additional complexity and development costs of an internal web site. This direction was especially popular with mid-sized and large companies where the higher deployment costs of WinForms/WPF were a factor.

With last year’s “Windows 10 Fall Creators Update”, the UWP model changed and it became possible to install UWP applications directly from a website. While not exactly the same experience as ClickOnce, at least it’s a start. Concurrently, Microsoft has had a team focused on making XAML/UWP more viable for LOB applications.

Windows UI Library

User controls are at the heart of any UI framework. The robust user control model was what made Visual Basic popular in the 1990’s and what continues to make desktop application development faster than HTML-based alternatives. But the deployment model for UWP brought with it some unnecessary limitations.

Since the main user controls, a.k.a. “platform controls”, were baked into the OS, applications had to be very conservative on when they adopted new controls. This is especially problematic for corporate environments where the machines, while running Windows 10, are often a release or two behind the general public.

To address this, platform controls are now being released as NuGet packages. This allows developers to utilize the new controls without waiting for the rest of the company to catch up on Windows releases. These NuGet packages require at least the Windows 10 Anniversary Edition from August of 2016.

These controls address well known gaps in the UWP ecosystem such as not having a tree-view, menu bar, or color picker.

.NET Standard

As with .NET Framework and .NET Core, UWP now supports the .NET Standard 2.0. This will allow developers to move their business logic and data models into a .NET Standard library. From there they can share the same code in a traditional desktop application, website, or UWP app. In theory this will make migrating from WinForms/WPF to UWP much easier.

UI Density

Microsoft describes the default spacing and sizing in UWP as “generous with lots of whitespace”. The Windows release planned for this year will change the defaults in order to free up more screen real-estate by automatically reducing the control sizes, padding between controls, the font sizes, and in general make everything more compact. They estimate you’ll be able to increase the amount of controls on the screen by roughly a third.

Developers can further reduce the size of the controls by choosing the compact mode. This reduces the spacing between controls by 40% and allows approximately 50% more data to be seen at one time. This feature is mostly directed towards data intensive, line of business applications.

Color Theming

It is well known having a pleasing color scheme makes users more confident in a tool. But with something as complex as UWP/XAML’s style model, there often isn’t enough time to even apply basic colors. Fundamentally, the problem is the style for each type of control needs to be updated separately and then tested against the overall theme. And there rarely is enough time for this when building a line of business application.

A new tool, tentatively called “Color Demo”, is meant to address this. Using simple color pickers, it can preview what the theme will look like and generate the necessary resource dictionaries to be included in the application.

Furthermore, it will warn when the color choices may cause problems like not having enough contrast to make text readable.

This still won’t be as rich as a fully styled XAML application, but it may provide enough polish to give the application a professional appearance.

Data Validation UI

Another glaring hole in UWP is the lack of data validation support. This is an odd oversight as data validation has been part of .NET UI frameworks since the very beginning. (We discuss some of these interfaces in the article Models and Their Interfaces in C# API Design.)

New for this year is the ability to use the INotifyDataErrorInfo interface along with attribute-based validation. When a model exposes this interface, the UI will be able to automatically display the correct error messages. The exact way it displays the error will depend on which mode you choose in the control.

Implementing INotifyDataErrorInfo isn’t exactly easy. There is a lot of boilerplate involved in attaching attribute-based validation to the INotifyDataErrorInfo interface. So, you may want to look at a MVVM framework that handles this for you. [One such example is this author’s Tortuga Anchor library.]

New XAML Controls: Data Grid

For non-UWP developer, it may seem rather remarkable no data grid is available out of the box.

For a line of business developer, it is almost unthinkable that a UI framework wouldn’t have a data grid. Even back in the mid-90s, a variant of this control was in the heart of countless business applications. Many developers considering UWP are surprised to learn that Microsoft hasn’t already ported a data grid from WPF or Silverlight.

I am migrating to keep my UI applications cross-platform with Xamarin.Forms. My goal is to target not only smartphones (iOS, Android), but tablets (iOS, Android, Windows 10) and laptops/desktops (MacOS, Windows). Accounting for screen size only adds marginal code, but using Xamarin.Forms allows me to create an application that runs multiplatform, including Windows with the UWP project in the solution.

The UI coding is still XAML and C# and the common code are libraries in C# with .NET Standard 2.x. Being able to deploy my UWP project in an easier manner is all good for me.

InfoQ Weekly Newsletter

Join a community of over 250 K senior developers by signing up for our newsletter. If you are based in the EEA, please contact us so we can provide you with the protections afforded to you under EEA protection laws.

Is your profile up-to-date? Please take a moment to review and update.

Email Address

Note: If updating/changing your email, a validation request will be sent

Company name:

Keep current company name

Update Company name to:

Company role:

Keep current company role

Update company role to:

Company size:

Keep current company Size

Update company size to:

Country/Zone:

Keep current country/zone

Update country/zone to:

State/Province/Region:

Keep current state/province/region

Update state/province/region to:

Subscribe to our newsletter?

Subscribe to our architect newsletter?

Subscribe to our industry email notices?

By subscribing to this email, we may send you content based on your previous topic interests. See our privacy notice for details.

You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.

We notice you're using an ad blocker

We understand why you use ad blockers. However to keep InfoQ free we need your support. InfoQ will not provide your data to third parties without individual opt-in consent. We only work with advertisers relevant to our readers. Please consider whitelisting us.