Skip to main content
April 2, 2014
PC

Bringing WinJS cross-platform and open source



This post was authored by Maria Kang, Program Manager, Windows Ecosystem & Frameworks Team

Today the source code of the Windows Library for JavaScript (WinJS) is being released under the Apache 2.0 license as an Open Source project by Microsoft Open Technologies (MS Open Tech). The source code is available now on GitHub where you are welcome and we encourage you to try it out, provide feedback, and submit contributions.

Additionally, WinJS is taking its first steps to becoming cross-platform by supporting browsers and other devices. Web developers can now take advantage of high-quality controls and infrastructure, and existing WinJS developers can expand their reach beyond Windows to the web and non-Windows devices.

What is WinJS?

WinJS is a JavaScript library that was first created for Windows 8 to enable first class, native-quality experiences in Windows Runtime apps using familiar web technologies like HTML, CSS, and JavaScript. The first version of WinJS provided high-quality infrastructure including page controls, promises, and data-binding. It also offered polished UI capabilities like virtualized collections and high performance controls such as ListView, FlipView, and semantic zoom.

WinJS 2.0 was introduced with Windows 8.1 and added new UX patterns like the Hub control, and optimized performance for greater flexibility for designers and developers.

WinJS was initially focused on native Windows Runtime apps, but began to focus on other platforms by debuting in the Xbox One apps, adapting to the Xbox look and feel, and allowing new inputs like voice using Kinect.

Continuing in this spirit, the library has been extended to smaller and more mobile devices with the release of WinJS 2.1 for Windows Phone 8.1, which was announced today at //build. Now that WinJS is available for building apps across Microsoft platforms and devices, it is ready to extend to web apps and sites on other browsers and devices including Chrome, Firefox, iOS, and Android.

Why go cross-platform?

The top feedback from developers who use HTML/CSS/JavaScript for their app development is that they appreciate the reach it gives them across devices. Extending WinJS to other browsers and devices beyond Windows further extends their reach and allows them to bring the personality of Windows apps to the web without rewriting code or learning new skills.

Check out WinJS now

The team has already been working to enable some WinJS features to run on the web. You can see the new WinJS in action by going to the Try WinJS site. In your favorite browser, view and edit code live, and check out the results.

clip_image002

What’s next?

Now that WinJS is open source, the development process is transparent. The team wants your help to make WinJS better. The community is welcome to provide feedback on the check-ins, bug fixes, and new features through GitHub. You can build and test products on a daily basis using the most up-to-date version of the source code and corresponding tests. You can request bug fixes and new features by filing bugs. You can also submit pull requests for your contributions, all through GitHub. Your involvement can impact the quality and direction of the project significantly.

Check out the plan for the road ahead to see where you can get involved. You can find the Roadmap documentation on the WinJS GitHub wiki page.

clip_image003

Feedback from web developers suggests that they like to combine several libraries, use their favorite tools for editing, debugging and testing, and fine tune the code that will power their apps. To address this, in the next phase of the project we’ll focus on support for popular frameworks like Angular and Knockout, as well as other tools, libraries, and solutions that web developers use and love today. There’s already been a lot of progress toward this goal:

  • The WinJS is now hosted on GitHub
  • The WinJS build infrastructure has been moved over to leverage Grunt
  • CSS files are now being generated with LESS CSS
  • Unit tests are runnable using QUnit

In addition to tools and frameworks, the team continues to bring innovative new functionality to the library without causing breaking changes in the existing apps using WinJS. As platforms innovate in form factors and user input, WinJS UX will evolve along with them. The same set of developers who have been solving hard UX problems on the WinJS team for the last few years are now assigned to the MS Open Tech Hub and will continue to work on those problems in the future.

The team is thrilled to expand the reach of WinJS developers to new devices and browsers and excited to see where this journey goes. Expect plenty of code commits coming to the repository soon!