locked
Jquery for Metro style apps ?

    General discussion

  •  for metro style app development , will Jquery alone be enough  ? i previously have used jquery with CSS/HTML for web development only and have no prior experience with desktop development . So i am not sure if the methods available in Jquery will support nativeApp/ metroApp development fully ?
    Friday, February 24, 2012 6:49 PM

All replies

  • You shouldn't need to use jQuery at all unless you reeeealy need to bring in the library to do specific things. Start out without jQuery and go from there. And also best to see if you can do it in WinJS before adding jQuery(eg. mouseover effects that are already in WinJS).

    Example, here's a thread I made asking on making push animation on a div. I could have used jQuery I guess, but why, since it's built into the WinJS already.

    Friday, February 24, 2012 6:59 PM
  • "You shouldn't need to use jQuery at all unless you reeeealy need to bring in the library to do specific things"

     So the answer is YES if i want to and that too for every possible event . RYT  ?

     Thing is ,i am more comfortable with writing jquery than raw js and frankly speaking , never used javascript for event handling as such .So may be you undesrstand my concern here !

    Say if i want to handle a CLICK event , how should i write my code (In JQuery  considering that WINJS thing you mentioned ). how exactly will it affect ?


    • Edited by kvmhjn Friday, February 24, 2012 7:19 PM
    Friday, February 24, 2012 7:19 PM
  • Here's a snippet of our code, simple adds click events to divs inside a parent div.

    function attachNewestClickEvents() {
            var newestItems = document.getElementById("NewAppsContainer");
            var items = newestItems.children;
    
            for (var i = 0; i < items.length; i++) {
                var item = items[i];
    
                item.addEventListener("click", Click_ProductItemBox, false);
            }
        }
    Trust me, we've done a LOT with the Windows 8 app we're developing for Microsoft, and I haven't ever thought of adding jQuery to do stuff...yet :)
    Friday, February 24, 2012 8:31 PM
  • Another way to say it, don't use jQuery just because you don't want to be hit with the learning curve. Windows 8 HTML5 Metro apps had a larger learning curve than I was expecting, probably to the point where I really don't enjoy making these apps as they stand right now...but that's also how you learn stuff.
    Friday, February 24, 2012 8:58 PM
  • This looks quite overdone.Why not use/sit on top of existing web dev stuff??
    Saturday, February 25, 2012 10:19 AM
  • you misunderstood me . I said i WANT TO use JQuery .I am comfortable writing this .   And NOT raw Javascript . So my question is "can we use it at all or not " ?

    Otherwise i will have to practice javascript explicitly :(

     
    Saturday, February 25, 2012 11:42 AM
  • WinJS is "JavaScript" as much as jQuery is "JavaScript". I'm just saying that if you go the WinJS route you'll learn more and more about Metro apps, how the application works, built in functionality, promises, etc. None of us knew WinJS either when we came into this.

    And there's tons of samples like in the "Windows 8 Developer Preview Metro style app samples" pack, hundreds of projects in here:

    http://code.msdn.microsoft.com/windowsapps/Windows-Developer-Preview-6b53adbb

    Monday, February 27, 2012 3:48 PM
  • okay , thanks a lot 
    Wednesday, February 29, 2012 3:35 PM
  • To be clear, you should be able to use jQuery just fine. If you find a case where it doesn't work, please file a bug through Connect or post in the forums. The same goes for any other JS library.

    Cheers,

    -Jeff

    Wednesday, February 29, 2012 6:14 PM
  • @ Harlequin,

    We'd like to follow up with some of your experiences with WinJS.

    Please contact me on acollier [at] microsoft.com

    Thanks,

    Adrian

    Monday, March 5, 2012 9:56 PM
  • I have a general question about WinJs. If I choose to go with HTML5 and WinJs for Metro style app developement is WinJs cross-platform?
    Wednesday, June 6, 2012 2:27 PM