Windows 10 Development - Web Platform



In Windows 10, it is very easy for the developers to create Universal Windows Platform (UWP) application and host their website on that application which can then be published to Windows Store for downloading.

Advantages

  • With this new feature in Windows 10, web developers can easily convert components of their web sites into Windows apps.

  • However, all those components will still be hosted remotely on their own web servers.

  • Additionally, they can also access universal APIs, which will allow the developers to access some cool stuff like the notifications, camera, calendar, Cortana, and more.

Microsoft hopes that this feature and ability will attract more developers to write apps for the Windows 10 platform, which includes.

  • Desktops
  • Smartphones
  • Xbox
  • Tablets
  • HoloLens and other devices

Presently, there is only one problem with this feature and that is security. Obviously, Microsoft needs to address this as soon as possible.

Let us understand with the help of an example in which we will host a website and convert that website into a Windows app.

Follow the below given steps.

  • Create a new Universal Windows Project from File > New > Project.

Web Platform Project
  • Select JavaScript > Windows > Universal option from the left pane of the New project and dialog.

  • From the middle pane, select Blank App (Universal Windows).

  • Write in the name field, UWPWebApp and click the OK button.

  • If you look at the Solution Explorer window, you will see some files and folders.

Web Platform File
  • Delete the css, js, WinJS folders and the default.html file, because in this example, we are just hosting a website and we assume that all the contents are on the remote server. Therefore, we do not need most of the local files.

  • After deleting the above mentioned files and folders, now double click on the package.appxmanifest file and you will see the following window.

Web Platform After Delete
  • Now specify the website URL by replacing the default.html in the Start page field by the URL. For the purpose of demonstration, we will be using the URL https://www.google.com.pk/ website.

Web Platform URL Replace
  • Now go to the Content URIs tab and define the rule and access permission for your web app.

Web Platform Count URLs
  • In the URI field, specify your website link and then select Include from the Rule dropdown and All from WinRT Access.

  • When you run this application, you will see the google start page on your app as shown below.

Google Start Page
Advertisements