1.    06 Jul 2015 #1
    Join Date : Oct 2013
    Posts : 15,690
    64-bit Windows 10 Pro build 14955

    Project Westminster in a nutshell

    Hi, I知 Kiril Seksenov an Engineer on the Microsoft Edge Web Apps team, I知 so happy to talk to you in depth about Project Westminster.

    About Universal Windows Platform Bridges

    Universal Windows Platform Bridges consist of a toolkit of three components: developer tools, Store ingestion processing, and Universal Windows Platform runtime frameworks. Today we値l address Project Westminster, which gives you the ability to leverage your existing web development workflow and publish your responsive website to the Windows Store. The team calls these published websites Hosted Web Apps, since the majority of the content is being served from your website.

    Project Westminster in a nutshell

    Project Westminster makes it simple for you to bring existing Hosted Web Apps to Windows 10.

    (see video at source)

    Project Westminster embraces 鍍he way of the web by giving you the opportunity to publish an app while continuing to use your tools, developing your code and deploying to the host you desire. Just enter your app痴 start page URL and define the app痴 scope of URLs in the app manifest to create a Universal Windows Platform app. Continue with platform integration by pushing code to your servers, feature detecting for and directly calling Universal Windows APIs. Once deployed, hit F12 on a Windows machine to test and debug your app.

    Through the Application Content URI Rules (ACURs) or URL allow list you値l be able to give remote URLs direct access to Universal Windows APIs from remote HTML, CSS, and JavaScript.

    While building Hosted Web Apps, Project Westminster is agnostic to the developer workflow that you致e chosen. Simply put, you can keep using your favorite code editor, source control and hosting service while developing your website.

    Once your website is published as a Hosted Web App in the Windows 10 Store you are able to continuously deploy updates by pushing changes to your servers no need to re-submit your app to the Store. You also gain the opportunity to integrate with the platform by directly calling into the Windows namespace from JavaScript hosted on your servers without the need for packaged code.

    12345 if (typeof Windows &&

    typeof Windows.UI &&

    typeof Windows.UI.Notifications !== 'undefined') {

    //Call Windows.UI.Notifications


    Better JavaScript app support

    Project Westminster represents an evolution in our continued Web App investment. HTML/JavaScript apps have existed on the platform since Windows 8. However, they were restricted to packaged apps. What this meant was that the app could not directly navigate to a remote URL. Remote in app content could be navigated to only through the WebView control. With Windows 8.1, the Web App Template for Windows used the WebView model to assist developers in publishing websites as apps. In Windows 10, we give the JavaScript app host the ability to directly navigate to remote pages. This eliminates the need to load two web framework instances, as is the case when using the WebView. This is great when developers don稚 require the granular control provided by the WebView痴 API set. We also enable hosted code running in the app host to directly call Universal Windows APIs. This eliminates the need for packaged code to integrate with the platform.

    Where does this bridge go?

    This bridge enables you to publish your responsive Web App on Windows 10 as a true UWP app. Project Westminster also makes it even easier to integrate your web app with Windows features like Cortana voice commands and authentication. Platform capabilities are only available when your site is running as a Universal Windows Platform App in the App Host on Windows 10. Your web app will not be able to call platform APIs when navigated to in Microsoft Edge or other browsers. Your web app will also not be able to run ActiveX, Flash, and other legacy components that aren稚 available in Microsoft Edge.

    What happens at the Windows OS level

    Since JavaScript is a natively supported language on the Windows platform, all that痴 been described so far is possible through your existing language and framework choices.

    At the OS level, the right policy bounds have been set to allow code hosted on your web server to directly call platform APIs. You define these bounds in the app manifest when you place the set of URLs that make up your Hosted Web App in the Application Content URI Rules (ACURs).

    (see code at source)

    If a URL is defined within the app痴 bounds (ACURs) it can be granted access to the platform through the 展indowsRuntimeAccess attribute. The Windows namespace will be injected and present in the script engine when a URL with appropriate access is loaded in the App Host. This makes Universal Windows APIs available for the app痴 scripts to call directly. As a developer you just need to feature detect for the Windows API you壇 like to call and if available proceed to light-up platform features. For WindowsRuntimeAccess, these attributes will give the following access:

    • all: Remote JavaScript code has access to all UWP APIs and any local packaged components.
    • allowForWeb: Remote JavaScript code has access to custom in package code only. Local access to custom C++/C# components.
    • none: Default. The specified URL has no platform access

    Here is an example of how to implement a Live Tile and update it from remote JavaScript:

    (see code at source)

    This code will produce a tile that looks something like this:

    You benefit from all web platform improvements and updates. The web platform that powers the Microsoft Edge browser, including the new rendering engine built for the modern web is also behind Project Westminster. Project Westminster follows the way of the web, allowing developers to use familiar techniques, keeping their resources on a server feature detecting for Windows capabilities prior to calling them. If platform capabilities are not available, and the web app is running in another host, developers can provide the user with a standard default experience that works in the browser.

    Since, even today, users do not always have an internet connection, creating a standard offline experience is important for developers. Even though the premise of Hosted Web Apps is to keep most code remote and not alter the web workflow, we encourage you to provide varying levels of offline support for your app.

    What kind of offline experience can my Hosted Web App support?

    At minimum you should include a local default error page that will be displayed automatically by the app if there is a navigation error to the remote website. The required name for the default page that will be displayed is msapp-error. You are free to set the content and style of this page and can also able to display the actual error as it痴 passed through the query parameter.

    Of course, there are HTML technologies like IndexedDB, localStorage and AppCache, which are supported by Microsoft Edge. A local page can be kept in your app package that can still provide a basic offline experience.

    Can I have a mix of local and remote content?

    Yes, you can switch between the different URI schemas to navigate between local and remote content.

    The app host allows navigations between local and remote pages. Navigation to a local page can be done using the ms-appx:/// or ms-appx-web:/// protocols, allowing you to load html/css/JS from inside the package for an offline experience. In the app host, navigation between ms-appx-web:/// and https:// protocols allows you to switch between local and hosted pages.
    URI schema Description
    https:// Web content over secure socket layer used for staging and live deployment environments.
    http:// Web content over standard transfer protocol to be used in development environments where it痴 a burden to configure a SSL cert.
    ms-appx-web:/// Content a developer has included within their app package, but should be treated, and behaves as, web content.
    ms-appx:/// Local packaged content. Default CSP applied.

    What happens in the Windows Store?

    Any application built with Project Westminster will be a Universal Windows Platform App and publishable to the Windows 10 Store. When you enter URLs in the app manifest and package the app you値l have all that痴 required to submit to the Store. From there you値l be able to follow the standard developer submission flow for any Universal Windows App. Once submitted, your app will be discoverable by users and have the ability to be installed across the range of Windows 10 devices.

    Developer Experience for Project Westminster

    To get started with Project Westminster or as we call it, Hosted Web Apps on Windows, you値l need Windows 10. You are able to create Hosted Web Apps using Visual Studio 2015 or the Command Line Interface. In this article, we値l walk you through how to create your application and debug it using Visual Studio. Check out our Yeoman generator for Windows 10 Web Apps if you壇 prefer the CLI.

    For additional information, check out these links

    How code reuse and new reach works for Project Westminster

    Project Westminster allows you to reuse your existing website code to gain more reach and discoverability when you publish to the Windows Store. Publishing your existing web app to the store means that your experience will be available across the entire family of Windows 10 devices. Including desktop, phone and Xbox, HoloLens, SurfaceHub and IoT in the future.

    As you decide to adopt more of the Universal Windows Platform and provide native functionality, Project Westminster helps you take advantage of Windows features like Live Tiles, Cortana, Notifications, Calendar, Contacts and more by giving you the opportunity to call Universal Windows APIs directly from JS hosted on your server.

    Wrapping up

    To get started and see for yourself how straightforward it is to turn your website into an app on Windows 10 check out the Visual Studio or CLI instructions. If you are interested in learning more check out the Microsoft Edge Web Summit talk on Hosted Web Apps. If you find bugs or issues, please leverage the Windows Feedback tool or MSDN forums. If you have any new features, please submit them over at UserVoice.

    Source: Project Westminster in a nutshell | Building Apps for Windows
      My System SpecsSystem Spec

  2.    07 Jul 2015 #2
    Join Date : Oct 2013
    Posts : 15,690
    64-bit Windows 10 Pro build 14955

    Publish responsive websites to Windows Store with Project Westminster

    Updated July 7, 2015 1:33 pm - Windows 10 introduces support for Hosted Web Apps using the Universal Windows Platform bridge known as Project Westminster. This gives you the ability to easily publish your website or web app to the Windows Store. Project Westminster embraces web developer workflows, allowing you to keep using your existing tools, repos, hosting service, language and framework choices. All that痴 required to publish an app is the entry of your site痴 URL into a manifest and the definition of URLs that make up your app.

    Once your app is deployed on Windows, developers can fully integrate with Windows 10 by calling native APIs directly from server-side JavaScript. To do so, just add the code and push a change to your website―there is no need to resubmit to the store.

    (see video at source)

    You can learn more, including examples and additional resources, in my post on Building Apps for Windows: Project Westminster in a nutshell.
    Source: Publish responsive websites to the Windows Store with Project Westminster | Microsoft Edge Dev Blog
      My System SpecsSystem Spec


Similar Threads
Thread Forum
Interact with Desktop using Project Spartan...
I am a developer who currently has a web application that calls a COM object on the PC that IE is running on. With Project Spartan I'm aware that they are getting rid of Active X which is the method we used to be able to do this. What I'm...
Browsers and Email
Solved No Project Spartan in Build 10049
Hi there. I recently installed 10049, but Project Spartan is not there or isn't working. When I go to All Apps and search under P for Project Spartan, there is an icon. When I click on it, it puts a big picture of Project Spartan on the screen, but...
Browsers and Email
Internet Radio Project
I am working on a Raspberry Pi internet radio with some python codes I borrowed and a customized design interface on a 3.5" LCD touchscreen. This is my work in progress ( I am still working on a case.) https://youtu.be/9pvngovW2pU
Chillout Room
Project Spartan
I saw somewhere on a MS site that if you are a member of THe insiders Club that you can download this browser. I can't seem to locate the url for the download. Can anyone help with this?
Browsers and Email
Coding project...
I was thinking it might be a fun project(for me) to code up a script(s) to scrape the thread http://www.tenforums.com/chillout-room/2154-change-letter-game-2-a.html and find all of the unique words that have been submitted. Oh and find the total of...
Chillout Room
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

ゥ Designer Media Ltd
All times are GMT -5. The time now is 19:39.
Find Us
Twitter Facebook Google+

Windows 10 Forums