WinJS

{{Short description|Open-source JavaScript library}}

{{inline|date=March 2025}}

{{Infobox software

| name = WinJS

| developer = Microsoft

| logo = WinJS logo.png

| released = {{Start date and age|2012|10|26}}

| discontinued = no

| latest release version = 4.4.5

| latest release date = {{Start date and age|2019|01|25}}

| latest preview version =

| latest preview date =

| programming language = JavaScript, TypeScript

| repo = {{URL|https://github.com/winjs/winjs}}

| operating system = Windows 8,
Windows 10,
Windows Phone 8.1,
Windows 10 Mobile,
Xbox One system software

| platform =

| size =

| language =

| language count =

| language footnote =

| genre = Software framework

| license = Apache License 2.0

| website = {{URL|www.buildwinjs.com}}

| alexa =

| standard =

| AsOf =

}}The Windows Library for JavaScript (abbreviated as WinJS) is an open-source JavaScript library developed by Microsoft. It has been designed with the primary goal of easing development of Windows Store apps for Windows 8 and Windows 10, as well as Windows Phone apps for Windows Phone 8.1, Windows 10 Mobile and Xbox One{{cite web|title=Building Xbox One Apps using HTML and JavaScript|url=http://channel9.msdn.com/Events/Build/2014/2-647|work=Building Apps for Windows|publisher=Microsoft|access-date=7 April 2015}} applications using HTML5 and JavaScript, as an alternative to using WinRT XAML and C#, VB.NET or C++ (CX).

WinJS started as a technology that was specific to Windows Store apps, but has evolved to aim at working in any Web browser. In April 2014, during the Microsoft Build developer conference, WinJS was released under the Apache License as free and open source software to port it to other than Microsoft platforms. A site dedicated to demonstrating the library has also been published.{{cite web|title=Extending platform commonality through universal Windows apps|url=http://blogs.windows.com/buildingapps/2014/04/02/extending-platform-commonality-through-universal-windows-apps/|work=Building Apps for Windows|date=2 April 2014 |publisher=Microsoft|access-date=18 September 2014}}

Future development on WinJS is focused on maintaining what currently exists in the project. There are no plans for new features or feature requests, meaning no plans for a new feature release.{{Cite web|url=https://github.com/winjs/winjs/blob/1878cb869c2b98d4769cb931f1abd83a2e208e07/README.md|title=winjs/winjs|website=GitHub|access-date=2016-05-09}} However, the WinJS repository hasn't had a new commit since 2020.{{Cite web|url=https://github.com/winjs/winjs/commits/master/|title=winjs/winjs|website=GitHub|access-date=2025-01-11}}

Overview

WinJS provides helpers that facilitate the development of Windows Store apps using HTML5 and JavaScript. The library consists of modules and functions that expose the Windows Runtime in a way that is consistent with JavaScript coding conventions. WinJS makes it possible to add Windows UI controls in HTML. This is accompanied by support for data binding and a template engine.

Other JavaScript frameworks, such as JQuery, can work side-by-side with WinJS. The library comes with additional declaration files for a rich developer experience using TypeScript, a strict superset of JavaScript with annotations. TypeScript enables for code completion and refactoring while maintaining compatibility with JavaScript.

Features

  • UI controls with fundamental support for touch, mouse and keyboard.
  • Scaffolding.

Version history

= WinJS 1.0 =

The first version of WinJS. It was released with Windows 8.

= WinJS 2.0 =

WinJS was released as open-source software under the Apache License on GitHub by popular demand. The project aimed at cross-platform and browser compatibility. The following distributions are derived from WinJS 2.0:

  • WinJS 2.0 for Windows 8.1
  • WinJS Xbox 1.0 for Windows
  • WinJS Phone 2.1 for Windows Phone 8.1

= WinJS 3.0 =

WinJS 3.0 was released in September, 2014{{cite web|title=WinJS Everywhere|url=http://blogs.windows.com/buildingapps/2014/09/17/winjs-everywhere/|work=Building Apps for Windows|date=17 September 2014 |publisher=Microsoft|access-date=18 September 2014}} with special focus on:

  • Cross-browser/cross-platform support spanning the most popular desktop and mobile browsers, as well as HTML-based app environments like Apache Cordova
  • JavaScript modularization giving developers the control to optimize their performance and load just the modules of the WinJS library they need for their Web site or app
  • Improved universal control designs

= WinJS 4.0 =

A preview of WinJS 4.0 was announced on March 27, 2015, and the full release was announced on June 8.{{cite web|title=A Preview of WinJS 4.0|date=27 March 2015 |url=http://blogs.windows.com/buildingapps/2015/03/27/a-preview-of-winjs-4-0/|publisher=Microsoft|access-date=31 March 2015}}{{cite web|title=WinJS 4.0 released|date=8 June 2015 |url=http://blogs.windows.com/buildingapps/2015/06/08/winjs-4-0-released/|publisher=Microsoft|access-date=8 June 2015}}

See also

{{Portal|Free and open-source software}}

References

{{Reflist}}

:*{{cite book |last1=Isaacs |first1=Scott |last2=Burns |first2=Kyle |title=Beginning Windows Store Application Development–HTML and JavaScript Edition |date=2013 |publisher=Apress |isbn=978-1-4302-5780-6 |pages=93–112 |chapter-url=https://link.springer.com/chapter/10.1007/978-1-4302-5780-6_7 |access-date=18 March 2025 |language=en |chapter=WinJS Collection Controls|doi=10.1007/978-1-4302-5780-6_7 }}

:*{{cite book |last1=Kumar |first1=Senthil |last2=Nagaraj |first2=Lohith Goudagere |last3=Rawal |first3=Pathik |last4=Rohilla |first4=Pryank |title=Windows 10 Development Recipes: A Problem-Solution Approach in HTML and JavaScript |date=2016 |publisher=Apress |isbn=978-1-4842-0719-2 |pages=15–30 |chapter-url=https://link.springer.com/chapter/10.1007/978-1-4842-0719-2_2 |access-date=18 March 2025 |language=en |chapter=Chapter 2: WinJS Fundamentals|doi=10.1007/978-1-4842-0719-2_2 }}