Microsoft's WinJS - New Cross-Platform Library
Written by Ian Elliot   
Friday, 19 September 2014

WinJS was Microsoft's JavaScript framework for the creation of "Metro" or WinRT apps. Recently it was open sourced and now, with the release of version 3.0, it has escaped the confines of WinRT to become a multi-platform framework.

 

winjs3logo

WinJS extended the basic HTML/CSS framework by making use of custom attributes and JavaScript to build new UI components and to implement databinding, promises and a number of other features.

If you were a Windows desktop programmer then its approach was both surprising and pleasing. I can't really know what sort of user base it attracted, but I suspect that most WinRT programmers chose to use either C# or C++, preferably with XAML as a markup language.

Even so, there seemed to be no reason why WinJS couldn't be modified to work in a standard HTML/CSS environment, e.g. a browser. Doing so would give it the advantage that you could create a WinRT UI and probably core code that could run in a browser as a web app.

This is exactly what has been done in WinJS 3.0. 

WinJS can now be used to create WinRT apps and web apps that will run under most desktop and mobile browsers and app environments such as Cordova. 

This is a remarkable new development and it makes WinRT and Windows Phone apps look far more attractive than they ever have. Suddenly a single framework allows you to run Windows Store apps in a browser and on a range of other mobile devices. And, given it is open source, Microsoft probably can't kill it off if it goes, from its point of view, horribly wrong. 

 

winjs3sample

 

Microsoft might well actually want this write-once run anywhere solution. Since Satya Nadella took over the company the emphasis on Azure as the universal supplier of services to anything that runs. WinJS may be the way to get Microsoft the role of the backend to any device.

Finally, the leaked information on the soon-to -be-previewed Windows 9 suggests that it can run WinRT apps on the desktop in a window. If this turns out to be true then WinJS will also provide a way to create installable web apps for Windows - something that has been missing since gadgets were removed in Windows 8. 

Overall WinJS suddenly provides a way to write an app that runs on a range of platforms that have previously been out of reach for a single code base. 

One of the nice things about WinJS is that it is well thought out and mostly well implemented. The latest version improves on the implementation by breaking the library up into modules. You now only load the modules that you actually use. This makes app creation cleaner and the WinJS framework easier to develop and extend. 

As well as all of this there are some improved universal control designs aimed at creating UIs that look identical on Phone, Tablet, PC and, I guess, the browser. 

You can also try WinJS without having to create your own project at try.buildwinjs.com.

With this one change WinJS goes from being a framework for creating apps targeting a very small market to one that does almost everything.

It is suddenly very worth considering as your universal app framework and it might even boost the profile of the WinRT app.

 winjs3logo

Banner


Akka Adds New Deployment Options
30/04/2025

Akka has announced new deployment options for its Akka platform, as well as new solutions to tackle the issues with deploying large-scale agentic AI systems for mission-critical applications.



Perl Back In TIOBE Top 10
07/04/2025

The surprise new entry, or rather re-entry, to the TIOBE index this month is Perl, which has jumped up from #24 last month to #19, replacing Kotlin which has tumbled to #25.


More News

 

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Friday, 19 September 2014 )