Quantcast
Channel: Infragistics Community
Viewing all articles
Browse latest Browse all 2374

What is a Windows Universal App and why should I care?

$
0
0

One of the key drivers behind a mobile or desktop platforms’ success are the number of apps available in its corresponding app store. The Windows Phone store is catching up, but is still very much behind iOS and Android. The Windows store faces the same issue - it just does not contain enough apps (although it’s improving).

The biggest issue Windows 8 and Windows Phone 8.1 stores had was that they were two separate stores. So, if you wanted to build an app for both Windows 8 and Windows Phone 8, you’d have to create two apps. It was possible though to reuse code between those two apps, using Portable Class Libraries, but reusing UI was not possible.

Microsoft acknowledged this issue, and has introduced the solution: Universal Apps. Universal apps allow developers to create one app, and deploy it to both the Windows 8 and Windows Phone 8 stores. You are now able to create a different package for each store with a single action; your app will be published to all users with a Windows device! This brings some major benefits to end users too: their identity is shared between the Windows 8 and Windows Phone app and purchases are synchronized so users only have to buy the app once.

Windows 8.1 vs Windows 10

There are subtle differences between Universal apps for Windows 8.1 and for Windows 10. In Windows 8.1, you’ll still create two app packages when publishing. One for Windows 8.1 and one for Windows Phone 8.1 as the two still technically use different stores. Windows 8.1 and Windows Phone 8.1 share a lot of code, user controls and templates, but still require custom code for each platform.

In Windows 10 this has changed. The two app stores have been merged into one store: The Windows 10 store. You only create one package, and it will be available on any Windows device. This also allows you to virtually reuse all code between Windows 10 for mobile, tablets, and desktop devices.

The rest of this post is split in two parts, one aiming at Windows 8.1 & Windows Phone 8.1, and one at Windows 10. Before opening Visual Studio, make sure you have updated to at least Visual Studio 2013 Update 2. We also focus on Visual C#, but you can use the language of your choice.

Build a Universal App for Windows 8.1 and Windows Phone 8.1

Open File -> New Solution and open the following template category: Visual C# => Store Apps -> Universal Apps.

  • The Blank App will create an almost empty solution, with no pre-baked code. You’ll have to create everything yourself.
  • The Hub App contains a three-page universal app that uses a Hub control. The Hub control is very useful for content that can be organized in different sections or categories.
  • A portable class library is a project template that allows for reusable components. It will be created for you when you choose Blank App or Hub App, but you may want to add more class libraries later on.
  • Windows Runtime Component: This project type is necessary when you want to build a JavaScript app, and run compiled code in a DLL.

 

The future: Build a Universal App for Windows 10

Windows 10 will be released this year and the big difference is that the Windows 8.1 and Windows Phone 8.1 stores will merge into the Windows 10 store. Every app will run on every available Windows 10 device, and will adapt to the device specifications. Universal apps for Windows 10 allows you to create one single app for all devices, and configure it to render as required.

In Visual Studio, go to File -> New Solution and browse to the category Visual C# -> Windows 10.

  • Blank Application creates a new, empty Windows 10 universal app,
  • Class Library and Windows Runtime Component: See the earlier description in the section about Windows 8.1 universal apps.
  • The Unit Test App template is a project template to create unit tests for a Windows 10 universal app.

 

The biggest challenge in a Windows 10 app is to design your pages to render properly on every device. The same page will be used on a Windows 10 desktop machine with Full HD resolution and on a Lumia 530 Windows 10 mobile phone with “only” 854 x 480 resolution. New controls have been introduced to help you achieve this, e.g. the RelativePanel and SplitView controls. Read more about adaptive controls here.

Reach more people with less effort

The introduction of Universal apps enables developers to create one app and publish it to multiple platforms. In Windows 10 this will be even better, as it will be truly one single app, whereas in Windows 8.1 the mobile and desktop/tablet app stores are still two different entities.

The future could be very exciting indeed. Windows 10 will be a free upgrade for all existing Windows 7 & 8 users, and apps will be available to a very big audience. Creating apps for both tablet/ desktop devices and mobile phones will be very easy with universal apps. By providing a universal app, customers with multiple devices will have a seamless experience between laptops, desktops, phones and tablets!

On the lookout for creating amazing native experience with mobile controls ? Here is your best stop - get Infragistics Windows Phone Controls now as part of the ULTIMATE Developer toolkit for a Free 30-day trial!



Viewing all articles
Browse latest Browse all 2374

Trending Articles