jQuery 2.0 adding support for making Windows 8 apps

Developers who want to make Windows 8 apps will have a new tool for that purpose, thanks to some help from Microsoft's open source division. This week, the company announced that the popular open source JavaScript library jQuery will add full support for making Windows 8 apps in its upcoming 2.0 version.

The announcement on Microsoft's Interoperability blog states that the company's Open Technologies subsidiary has been working with jQuery contributors appendTo to add Windows 8 app support for jQuery 2.0, which is currently available in beta form. Jonathan Sampson, director of Support for appendTo, wrote about what it took to adapt jQuery for making Windows 8 apps:

While jQuery meets the language criterion for Windows Store applications, Windows 8 exposes all the WinRT APIs within the HTML5 development environment, which comes with a new security model that made some code and common practices of jQuery flagged as unsafe in the context of a Windows Store application. AppendTo reviewed and re-authored portions of jQuery core to bring it into alignment with the Windows security model, as well as identified key areas where alternative patterns would need to be substituted for actually-used conventions.

This should open up Windows 8 for more developers, particularly those who have been making web-based applications with JavaScript and HTML5.

Source: Microsoft | Image via Microsoft

Report a problem with article
Previous Story

Review: Sony Xperia Z

Next Story

NBA player Grant Hill stars in latest Windows Phone TV ad

12 Comments

Commenting is disabled on this article.

Great just what we need, jQuery on the desktop... As if the fact I have it embedded in my solutions in VS by default isn't enough forcing people to have to take time remove it... Now they will just be making it available on WinRT...

Lets just get rid of .Net and C APIs all together and write everything in jQuery!

We can replace WPF, GDI and most of the Kernel with jQuery while we are at it!

I'll submit the first jQuery network driver, any takers!

Wow your comment is riddled with ignorance... In case you didn't know this is for metro style apps which already can be written in javascript (and a lot of them are) so jQuery is more than a welcomed addition and last time I checked nobody is able to write drivers with WinRT..

It sounds like you know nothing about developing apps for Windows 8, never mind the fact that it takes you a lot of time to remove jQuery from an empty project.

I know for a fact that Javascript and HTML5 are very powerful languages and jQuery just makes it simpler.

Edited by PmRd, Mar 31 2013, 5:32pm :

The problem is though that the JavaScript API for Windows 8 is simply slower than using C# + XAML so any developer who wants their app to perform smooth and at top speed would make a bad choice by using JavaScript. Good to see more options for JS development on Windows 8 but I'm personally staying away from it until WinJS performance is up to speed...

We cannot assume that every web developer (who probably knows HTML/CSS/JavaScript+PHP/ASP) wants to learn C#+XAML or is willing to use another developer for his program. Having the WinAPI accessible through JavaScript opens Windows programming to a whole new world of developers. And yes, the JavaScript engine is constantly improving (already pretty fast in IE10; probably faster in IE11).

Avi said,
Having the WinAPI accessible through JavaScript opens Windows programming to a whole new world of developers. And yes, the JavaScript engine is constantly improving (already pretty fast in IE10; probably faster in IE11).

Win8 has had JS support from the beginning. (just to clarify, your statement seemed to imply this was new)

Obry said,
The problem is though that the JavaScript API for Windows 8 is simply slower than using C# + XAML so any developer who wants their app to perform smooth and at top speed would make a bad choice by using JavaScript. Good to see more options for JS development on Windows 8 but I'm personally staying away from it until WinJS performance is up to speed...

Except in many cases that's not true (JS apps are often faster, especially for startup, but in a few other ways as well). You can also write a C# or C++ component for backend work and have it talk to your HTML/JS UI very, very easily.

Brandon Live said,

Except in many cases that's not true (JS apps are often faster, especially for startup, but in a few other ways as well). You can also write a C# or C++ component for backend work and have it talk to your HTML/JS UI very, very easily.

You must be the first person I've heard to say such a thing but as this isn't really my forte I won't argue...

Just think about this for 1.5 seconds... JS is faster.. JS... JS is interpreted... but wait.. how are those interpreters written? It must be some magical fairy... oh no... it's C / C++

.... aaaand it's gone.

And when it comes to RT apps.. I haven't done anything with the new Win API ( WinRT).. but I guess the fact (and this is a language implementation thing) that javascript is dynamically typed has GC etc. etc. must make it slower now matter how "native" it is.. even if javascript wouldn't be (in some way) interpreted, it would most certainly be slower than .NET and C / C++ (which are statically typed and have no GC, at least C / C++ hasn't)

oh and if it is true that javascript apps start faster on Windows RT devices than "native" ones... then there is really, really something wrong with it ;-)

Edited by dpro, Mar 30 2013, 9:55pm :

dpro said,
Just think about this for 1.5 seconds... JS is faster.. JS... JS is interpreted... but wait.. how are those interpreters written? It must be some magical fairy... oh no... it's C / C++

.... aaaand it's gone.

Actually most JavaScript engines these days compile most or all of the code. Windows even does some pre-JIT-ing for JS apps at install time.

And when it comes to RT apps.. I haven't done anything with the new Win API ( WinRT).. but I guess the fact (and this is a language implementation thing) that javascript is dynamically typed has GC etc. etc. must make it slower now matter how "native" it is.. even if javascript wouldn't be (in some way) interpreted, it would most certainly be slower than .NET and C / C++ (which are statically typed and have no GC, at least C / C++ hasn't)

oh and if it is true that javascript apps start faster on Windows RT devices than "native" ones... then there is really, really something wrong with it ;-)

I was talking about C# which is not native. It has to be JIT compiled and has a GC. Loading up the CLR and XAML engine can be slower than the JS and HTML engine.

There are other things like the control implementations that can make a difference as well.

Obviously doing a straight native C++ app gives you the best potential perf (although good luck writing a UI framework as well-tuned as the HTML or XAML ones...).

Most of the in-box apps are JS, though some have C++ backend components.

MikeInBA said,

Win8 has had JS support from the beginning. (just to clarify, your statement seemed to imply this was new)
Not something I was trying to imply... Was trying to say that not all developers can use C# and that is a good reason to have the JavaScript choice. Having JQuery available makes this path even easier to cross.

Avi said,
We cannot assume that every web developer (who probably knows HTML/CSS/JavaScript+PHP/ASP) wants to learn C#+XAML or is willing to use another developer for his program. Having the WinAPI accessible through JavaScript opens Windows programming to a whole new world of developers. And yes, the JavaScript engine is constantly improving (already pretty fast in IE10; probably faster in IE11).

WinJS is not Javascript.

Brony said,

WinJS is not Javascript.

Err... WinJS is a utility library (like jQuery) written entirely in JavaScript. And you are not required to use it to write an app (although using at least a couple pieces very much makes your life easier).