How to choose the right programming languages for my Universal Windows app project?

A question that comes up quite often.

Fun fact : While I was writing this post at the university campus café , a student came up to me asking this same question.

Lately, be it on developers’ forum, on campuses or in users groups, this question is often asked. This is not very surprising as the concept of Windows Universal Apps is recent, introduced for the first time during the last //build conference.

On the 21st of January, the official announcement of the release of Windows 10 gave a greater extent to the concept which brings its own share of benefits, innovations and opportunities for both the users and the developers.

Before exploring the choices of programming languages at our disposal and studying some important facts to be considered for a right choice, it is important to remind what is meant by universal apps.

Universal Windows apps: What are they?

IMPORTANT : first of all it is necessary to differentiate the Universal apps concept into the Visual Studio view and the Store view.

The store view consists in linking a Windows phone app to a Windows store app such that they share the same name and in some cases the same price and services like in-app purchases.

The Visual Studio view on the other hand implies development and code.

As this post unfolds, we will deal with the Universal Apps concept from the Visual Studio view.

clip_image002

The core of the Universal app concept is very easy: WRITING THE CODE JUST ONCE and associating to it the user interfaces suitable for ALL devices operating under WINDOWS.

It means therefore that from a unique Visual Studio Solution, we can henceforth produce app packages targeting phones, tablets, PCs, Xbox One, IoT, Surface Hub, HoloLens, etc. All at once thanks to Windows Runtime and code sharing logic.

Speaking of code, let’s have a closer look at the bunch of programming languages required to develop universal apps.

What are the languages used in Universal Windows apps?

The following default languages are available for the development of Universal Apps.

  • HTML, CSS and JavaScript.
  • XAML and C#
  • XAML, DirectX and C++
  • DirectX and C++

Good selection right? But this does not solve today’s problem which consists in choosing the most suitable languages for my project.

Now let’s see some factors that could influence our choice.

How do I choose the appropriate set of languages for my project?

There are certain factors to consider before choosing the most appropriate set of programming languages for our Universal Apps project. Among them we could point out;

  • Our background or personal (or team) experience: which will enable us to determine our level of familiarity or affinity with one of the sets of languages at our disposal.
  • The type and purpose of the app: this will inform us on the level of access in terms of material resources needed for our application.
  • Cross platform targeting

Considering our personal experience as the affinity factor.

When getting on a new platform, the first thing to do is to exploit our previous knowledge. For instance, if your team or you are used to one of the sets of languages proposed, it will be ideal to start by using them.

On my part, I already had some notions on web development and this naturally led me to write my first applications using HTML, JavaScript and CSS.

One of the things that pleased me was that nothing changes in our developing habits. We continue writing the code as usual, we access the same API and open standards, and in addition we have the WinJS library at our disposal which eases the reading of native apps through JavaScript.

If you are familiar to WPF or Silverlight technologies, then you will be at ease with at least one of the sets containing XAML. It is as a matter of fact the same declarative language you already know, in addition to some namespaces and libraries dedicates to Windows Universal Apps.

As compiled companions you will have to choose between C# and C++. It will all depend on your degree of familiarity with either language.

But if on the other hand you have no experience in the languages mentioned above, I will advise you to choose a set that seems easy to assimilate or the one that motivates you more...

Considering the type and aim of the app­.

It is extremely important to consider the type and aim of the app for the choice of the languages as they could quickly become a constraint, making your project impossible to realize with the needed performances.

If you are writing a work and productivity app, you can generally choose the language that best suits you. But if your ambition instead is to develop a game full of material resources or graphic applications, it will be ideal to turn to C++ or DirectX, as these enables you to stay close to the material and so enhance performance.

If you are not willing to learn the C++, JavaScript offers a good compromise. It is possible to develop apps with great intensity like 3D game. The U­niversal HTML /JavaScript apps manage very well 3D output engines like the WebGL.

Considering cross platform targeting

If your ambition is not limited to Windows Universal Apps and you desire to target Android and iOS platforms, rest assured. There exist several technologies that permit it easily.

The most popular are Cordova and Xamarin. These applications have the advantage of being profitable to virtually all the API from the different platforms.

If you feel at ease with HTML, CSS and JavaScript, Cordova is your companion. Whereas, if you are competent in C#, Xamarin is doubtlessly the technology to turn to.

About games, a good number of solutions allow cross platform targeting. We can name;

  • Unity: This permits us to enjoy the improvement of DirectX 12 available in Windows 10.
  • Construct 2: based on HTML, it allows the creation of 2D games.
  • Etc.

What’s next?

There are, of course, many other factors (such as time, budget, etc) that can influence our choice of languages for Universal Windows apps project. A good step forward will consist in analysing all these factors and tilting towards the solution that offers more possibilities and fewer constraints for our project.

Once the decision has been made, be you a beginner or an experienced person, you will quickly feel at home because the development of Universal Windows apps is open to all.

Handling is thus very easy especially through Visual Studio, a choice tool for development on the Windows platform that also integrates cross platform technologies not mentioning the availability of certain plugins and libraries that will prevent us from reinventing the wheel.

In addition to this, Microsoft offers lessons, tutorials and examples of codes, freely accessible from Microsoft Virtual Academy, Channel9 and MSDN.

Universal Windows apps samples