|Microsoft's WinJS - New Cross-Platform Library|
|Written by Ian Elliot|
|Friday, 19 September 2014|
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.
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.
To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, Facebook, Google+ or Linkedin, or sign up for our weekly newsletter.
or email your comment to: firstname.lastname@example.org
|Last Updated ( Friday, 19 September 2014 )|