Windows Store Apps For Architects

I am working on Windows Store Apps since the developer preview days and I have seen it change release by release to its official release. In this article I would like to express my understanding of these modern UI apps in the context of the solution or technology architects.

Understanding Shift

In today's world we see a shift in the way people interact with technology, there are new input mediums like touch, motion sensors, location sensors, cameras and many more. Even the display technology is changing where companies like Amazon are working on 3D displays that work without glasses. Micromax A115 Canvas 3D already has a 3D display that works without glasses. Samsung is working on a flexible/twistable display. People want to be connected no matter whether they are in the office or at home or travelling. So the software that supports that kind of new innovations had to be reimagined so then Microsoft Windows 8 developed.

Windows Store Apps


Many people think that Windows Store Apps will replace traditional desktop applications or that they are an alternate to them; this is a big misconception. Like we have Web Applications, Desktop Applications and Rich Thin-Client applications like Silverlight/Flash this is altogether a new paradigm.

These are the applications that are:

  • Small in terms of the number of screens yet effective
  • Natively installed on the device that may or may not need the internet to run
  • At times a subset of big applications
  • Lightweight in terms of data on the host machine
  • Optimized for touch
  • A fast and fluid user experience in terms of user productivity and application responsiveness
  • Free from the hassles of integrating with other applications

These applications are not meant for:

  • A lot of data entry
  • Great deal of multitasking
  • Mission critical 100% real-time applications

Why we care

This is another important one, to be honest as a .NET developer I do care about any new innovations that happen at Microsoft.

It is a well-known fact that Windows is an operating system of masses, its reach and acceptance is phenomenal. Developers can take advantage of this changing world and become front-runners in this modern era. This is the future trend and soon we will see it all around us.

For any existing .NET developer there is a very good learning curve. For people new to .NET, you have the world's best set of development tools in the form of Visual Studio. The available resources exist in the form of MSDN, MSDN Forums, code samples, Codeplex and all.

Where it fits

This fits into many kinds of application types including social, entertainment, games, productivity and even line of business applications.

A closer look at Win RT

As a layman if I was to ask what Win RT is then I would describe it as a reimplementation of a subset of the .NET framework with some additional features in a new type of component called Win RT. These components do not need the .NET Runtime for execution so one may think these are COM, but that is not true. These components are some sort of re-implementation of COM that can be directly consumed via any .NET application, it does not require any CCW or RCW for mutual interactions. This is possible via a new concept called Projection. These components are called WinMD in other words Windows Meta Data.

WinRT extends COM with modern features like static methods, properties, delegates, events, metadata and run-time type information. It is still interface-based and uses GUIDs to identify components. Its lifetime is still managed using ref counting and has an apartment style threading model.

Though these apps can be written using XAML/(C#, VB.Net, VC++), the entire XAML stack is used in these apps that have been re-written as WinRT.

WinRT is the API for Windows Store applications as in the following:

  • Only available on Windows 8 for Windows Store applications
  • Built and supported by the Windows OS team
  • Designed for highly performance

WinRT is not:

  • COM, at least as you know it
  • Based on Win32
  • A managed environment
  • Cross Platform

Architecture Concerns

This is the most interesting part of this article and with my experience I think it will contnue to evolve.

Security

These applications run in a Sandbox and no other application is allowed to read or interfere with other app data. If you need to securely save some user credentials, there is a Password Vault API to maintain them in the Windows Credential Manager. Bit locker security can encrypt your hard drive to further secure it. Further on multi-user machines these apps are registered separately and use a different Local Storage.

But as an Admin user you can navigate to that local store folder and steal data. You may even copy and paste those files from other users and paste them into your local folder to access the app in offline mode to gain access to other user's data. So when the data is sensitive you will need to encrypt the local storage files using some kind of key that is user-specific. This key can again be put into a Password Vault.

There are some restrictions on the App Store so you may also want to see: Understanding export restrictions on cryptography.

Performance

All apps need to be up and working in 10 seconds, if it takes longer then Windows will terminate the application. If there are crashes or responsiveness issues then those applications will not pass Application Certification and could not be published on the store.

New asynchronous programming in .NET 4.5 is awesome and relieves you of most of the pain. The Framework makes sure any operation that may take longer is always provided as an asynchronous API hence as a developer now you are bound to do asynchronous programming.

Usability

Most of the access and permissions are user controllable, in other words a user may deny your application to use location services or stop your app from using the Webcam. the availability of a physical barcode scanner is not guaranteed, you may need to use a camera or manual entry for getting barcode input. Some devices may have 10-finger touch and some may have 2-finger touch and same may not even have it. So you need to design applications to satisfy all such scenarios to provide the user the best possible user experience.

Offline Availability

Nearly all applications that interact with the internet need to be designed in such a way that even if the internet is not available the user sees what was downloaded when the device was last online. Hence caching data is very important and that even helps in performance.

Integration with Apps and Devices

These applications are built keeping in mind that no direct interaction with other applications and devices is ever needed. All such interaction will happen via Contracts. For example if your application wants to post on Facebook or Twitter then it is the responsibility of a Facebook or Twitter app installed on the user machine. Your application just must implement a share contract. Similarly for devices your app does not need to refer to a device-specific driver.


Similar Articles