Windows 10, A Pre-Release Guide For Developers


Windows 10 is about to arrive, July 29 is not so far away now (at the time of writing the article). I wanted to take some time to talk about Windows 10 for beginners. I will share a few keynotes about Windows 10, what the requirements are for developing for Windows 10, why develop for Windows 10 and how to develop for Windows 10. So these are our keynotes that are to be explained in this article. 
Remember, Windows 10 is still in preview. The API sets provided are subject to change by Microsoft in the future.

Windows 10 intro

Windows 10 is the next installment of the operating system Windows that has been developed, owned and distributed by Microsoft. Some say it would be the last installment of Windows ever, you will receive only updates for the system and Windows Update will include increasingly more features that will make your Windows experience even better and more secure by adding software patches to your system. 
Along with the new OS, there are many more fixes and patches to the system. The interesting thing for me was Edge (currently named Project Spartan) as the new version of Internet Explorer. You can consider using Edge for many uses, first of all, if you are a PDF reader and love reading books then you will feel at ease using the "Reading view" of Edge. Edge also can convert your web sites into images that you can draw upon, thus be able to share your web page.

Intro for developers

Getting to the main point of this article of what Windows 10 is from a developer's perspective. With every previous version of Microsoft Windows, there came another framework version. Specifically speaking, every Windows version was known to have another version of .NET Framework shipped with it. New tools, a new framework, and new updates and features were added to the Windows so that developers can consume them. 
Windows 10 is not about a framework or OS. It is about a platform that developers can use to develop their applications. Windows 10 has introduced a new way of developing applications, Universal Application Platform.  You should not confuse yourself with the Universal Applications for Windows 8 or Windows 8.1. They were a separate concept. They targeted operating systems, such as Windows or Windows Phone. 
Universal Applications (Windows 8, 8.1) Universal Application Platform (Windows 10)
Targets the operating system; Windows 8, 8,1 or Windows Phone 8, 8.1 Targets the device family, depending on which device family you have targeted.
Same shared code-base, different UI for Windows 8, 8.1 or Windows Phone 8.1 Shared code-base, same features. The device family ensures the UI features.
Code is not compiled to native code as is done in other .NET applications, byte code is created for every assembly. The code is compiled down to the metal using .NET native compilers.
Let us talk about the common differences (no pun intended)  between the two versions. In the Universal applications, you have had the same code-base (application logic) but you would have two projects in your Visual Studio solution. That concept of universal did not include Unity (Continuum). The Universal Application Platform removes that problem and you now need not need to manage a separate project for each operating system you need to target. Instead, you target the types of devices that you need and Windows provides the contracts for you to use for the devices. Think of a contract as the API. 
There are device families that you target, not operating systems. This removes the ambiguity of multiple UI features, various components from a designer's perspective. You just need to ensure that the devices that you target have a certain underlying contract. 
Microsoft is working to bring more and more device families to Windows 10 to enable you to reference them in your work.  A device family is a set of APIs or a framework that ensures certain features on a device. If you have a desktop that runs on Windows 10, then if someone targets your device, the UAP ensures that a feature is provided regardless of whether that runs or not. For example, your camera. Windows would have APIs to run an application that uses your camera on the Desktop but you might not have it at that time. Similarly, if you have a mobile device, Windows would provide the tools to develop an application that uses GSM or other mobile network types such as HSDPA (internet, simply) but you might not have activated the feature for the application to use. In other words, the API would be available even if you have not attached the hardware or have disabled it. 
IoT is hot in demand.  The old days are back with more Green chips, more cables and all. Developers have been working around with a way to configure their applications to work with home automation and similar techniques. Microsoft has configured Windows to run on a small micro-controller also, you can also see a live example of Windows installed on Raspberry Pi 2, a powerful computer in less than $35.  


1. Is the device family similar to an operating system?
No, a device family is not similar to an operating system.  An operating system is required to run your machine, whereas the device family is just a compilation of the APIs and features that a developer can use to program an application for that device. 
You could just target Windows 8, 8,1 and/or Windows Phone 8, 8.1. You can target one to any number of devices that you want your application to run on. You would need to determine whether an API exists in a device or not, to skip run-time exceptions. 
2. What happens if a new device family comes?
That is yet as unclear as is what would happen when a new device family comes, but a simple hypothesis would be that it would be added to the device that can run the API and you can target the family just the way you would do it in the current device family range.  
3. What if I want to develop for desktop and mobile-only?
If you want to target the desktop and mobile device family, then you should remove the Universal support and target the desktop and mobile families only. This way you will minimize the API check-ups for Xbox, Surface Hub or IoT devices.  
4. What is the default device family?
By default, Visual Studio would focus on the Universal device family that targets Desktop, Mobile and IoT.

Getting started

I would talk about getting started and setting up the environment for Windows 10 development, however, I will not share anything related to coding an application, instead, this article is just to get your environment ready since I will be continuously posting guides and programming techniques for Windows 10 applications, controls, UI templates, best practices and so on. 
First of all, since Microsoft has supported Windows 8.1 development in Windows 8.1 only, similarly, Windows 10 application development has some of the same rules and validity checks before entering the developer portal. You are required to have:
  1. Windows 10
    Of course, that is a legitimate reason, you need to have Windows 10 to consume the services and frameworks. Otherwise, you would need to install the features in an old system that would take the same time and the same space but with fewer features. The good things are that you can (for now!) use Windows 10's Insider preview and then try it out, until July 29 when Windows 10 is released publicly. Did you reserve your spot?
  2. Visual Studio 2015 

    Visual Studio 2015 is the next installment of the Visual Studio IDE provided by Microsoft. Visual Studio 2015 is capable of developing Windows 10 applications only. You need to have Visual Studio 2015's any edition. You can try the Community edition for testing purposes by Microsoft. Visual Studio 2015 comes free of cost for small teams, open-source projects and other same legitimate conditions. 
You need to have the preceding products before you can start developing for Windows 10. You can get them for free for your testing purposes and develop some Hello world applications. Go ahead, download and install them (or do so after completing this article).
Which language and framework to use
Windows 10 can be developed in C#, VB.NET, C++ or even HTML 5. It depends on how you want to use them, you can choose any language that you want to develop your applications for. The thing that matters is that you will develop applications for the Windows Runtime. There won't be any .NET involved. So if you think that the UI or other components seem to sound obvious, they are not. They are controls of Windows Runtime that is a separate framework to develop applications for. .NET also provides tools and kits, but .NET is not being talked about here.
The Windows Runtime is also basically an old framework and all of the techniques and how-tos have already been posted by many authors so you won't find yourself chased into trouble at any moment. Also, the structures of the applications are very clean and anyone with much low-level knowledge can understand what a certain file is intended to do.  
Windows Runtime can be programmed in:
  1. C++ (along with XAML or DirectX)
    You can choose whether to use XAML for the UI or DirectX.
  2. C# or VB.NET (along with XAML)
    You can choose which language to use for the code-behind.
  3. JavaScript (along with HTML 5 and CSS 3)
    You do not have any choice but these technologies to choose from!
All of these languages are popular, there are more than thousands of developers using them and most valuable authors are already posting samples and source code to these languages. Microsoft has also put much effort into writing samples for these application programming languages. You won't find yourself lonely.  

What's next

So, this is it for now. In future sections and articles, I will be posting code samples and suggestions for the best UI techniques, best UX practices, and other software development items. I would talk about the most commonly used controls in Windows 10 applications and how you can use the previous application's source code. Remember, Windows 10 can be developed using XAML but your Windows Presentation Foundation's XAML is something else. There are most of the things ambiguous in Windows Runtime and Windows Presentation Foundation and you must not become confused. 
You should get your environment ready and set up (download the required products)  I would then continue to post more source code examples for you to test and run. 

Publishing the applications

Once you have finished developing your application, you can submit the application to the Windows Store like all other stores. The good thing is that all of your applications, music, and books are compiled together into a single library now. So if a user of yours downloads an application, the store will prompt them to have a look at other products that you are offering to your clients, such as music, video, application or service whatever store might support. 
The store is currently in beta and will be live once Windows 10 is released publicly. 


In this article, we learned about Windows 10, A Pre-Release Guide For Developers.