Log in to like this post! What is jQuery? And how big is it? [Infragistics] Murtaza Abdeali / Thursday, February 16, 2012 jQuery is by far the most popular JavaScript framework ever developed. Released by John Resig and first launched in August 2006, since then, it has just seen increased demand year over year and solved many day to day web development challenges. The core production library is just 31K (229K development). The chart below tells the story of it adaption and jQuery market share today. In 2008, it’s public website usage was just 10% in top 10,000 websites, meaning 1 in every 10 of those websites used jQuery. Today, that number has reached almost 50%, 1 in every 2 of the top 10,000 websites in the public web space is using jQuery. Source: www.builtwith.com Comparing jQuery with other JavaScript libraries There are quite a few other JavaScript libraries that do serve a good client side scripting purpose of their own, but when it comes to pure market share, jQuery wins over all. Chart below shows some data on comparison of how popular jQuery is in the JavaScript libraries space. “How to read the diagram: - 48.0% of the websites use none of the JavaScript libraries that we monitor. - JQuery is used by 44.1% of all the websites, that is a JavaScript library market share of 84.7%.” Source: www.w3techs.com Works with Framework of your choice jQuery is a totally client-side JavaScript based framework. You can run it on any client that supports HTML & JavaScript, which means all the modern desktop, mobile & tablet browsers. It can work with web framework of your choice. I develop in ASP.NET Web Forms, ASP.NET MVC and have worked with oData in the past, so I can use the same jQuery knowledge that I have and apply to any of the different framework end points, as long as I can communicate via HTTP, I can apply my jQuery skills for the front-end development. In the future, if I had to work on a PHP or a Ruby project tomorrow, all I need to work on is on my server framework skills and I can carry over my jQuery skills over to that platform. Here are some of the blogs I have written in the past that shows how you connect to different data end-points using jQuery client controls: jQuery Combo box in ASP.NET MVC Binding Data from oData Service to jQuery Grid Solving the no JavaScript problem with jQuery Working with jQuery + Entity Framework + Infragistics jQuery Grid jQuery with PHP It is IDE Independent Adding jQuery to your web projects is as simple as adding reference to any JavaScript library, since it is a JavaScript library itself end of the day. Or you can point to a CDN to load the library, and you don’t even have to have it as a resource along with your projects. So, whatever your choice of IDE is, even it is notepad, building UI’s not using jQuery has no excuse . jQuery with Microsoft Visual Studio jQuery with Adobe Dreamweaver jQuery with Eclipse jQuery with PHP Zend Studio jQuery has a Mobile Web Framework too! jQueryMobile is a jQuery based mobile framework targeted towards building web applications for the Mobile Web space. It was RTM in November of 2011, and today owns a market share of 32% among the Mobile Web JavaScript frameworks. It has been in beta before that for almost a year. It supports a wide range variety of Mobile platforms. Source: www.builtwith.com Embraced by Microsoft & Abode From a development standpoint, writing JavaScript code has never been easy for web developers. However, with Microsoft and Adobe now integrating jQuery with their web development tools, it makes developers lives a lot easier. Following Microsoft for quite a few years now, I can say from experience that I have not seen a slight deviation in Microsoft’s push to make jQuery the de facto standard for UI development for its ASP.NET development since Scott Guthrie first announced it in his blog post back in 2008. The contribution and sponsorships to the jQuery project from Microsoft can be seen over time, it now ships with Visual Studio, Mobile template includes the jQuery Mobile framework as well. In addition, Microsoft also sponsored a jQuery conference last year at their Silicon Valley Campus and bringing John Resig on the Mix stage in March of 2010 to announce Microsoft’s close relationship with jQuery was among the steps Microsoft took to embrace jQuery as part of ASP.NET development and educate the community around it. Adobe’s interest in jQuery can also be seen by the fact that now there is a blog dedicated to jQuery and Adobe up on Adobe’s site. The latest version of Dreamweaver CS 5.5 supports jQueryMobile for building web sites includes jQuery Mobile framework too. jQuery Features that I Love For development, jQuery makes day to day tasks a lot simpler. The key framework features that I like of the framework are: Selectors: By just doing $(‘[Selector]’) you get an element (if there is only one), or array of elements (if the selector matches more than one element in the DOM). The Selector API makes JavaScript code very simple to write and complex tasks can be done in a fairly short amount of code. Method chaining: A great jQuery feature, it gives you jQuery object[s] at the end of every method call. This makes it easy to write a complex logic in a single line of code. For me it was one of those things that I didn’t get a hang of in the beginning, but one I got hooked on it I cannot imagine life without it. DOM Manipulation: jQuery DOM Manipulation API comes in very handy when doing complex DOM based tasks. Generating dynamic views, prompts, user notifications and changing styles are just among the few things you can do with this API. AJAX API: Strong AJAX API makes it easy to do get and post request to the server running a web application stack or directly to a data service. The AJAX API enables you to build strong client-centric data applications without a hard dependency on a web framework. ThemeRoller Styling: This feature is not part of the jQuery core, but jQuery UI. It is still an important piece because you can pick any jQuery plugin from the market and have it blend with your overall application without have to muck with control specific styles. So, when picking up a jQuery plugin from the market, make sure it adheres to ThemeRoller styling, it will save you a lot of time down the road. jQuery plugins: There is a gigantic growing community around open source and commercial jQuery plugins all over the web. It ranges to simple UI controls and UI frameworks to a full blown commercial grade grids and data visualization controls. So, what’s the verdict? I guess it is pretty clear. I really hope you are already using jQuery for your projects, and this post helps validate the fact that you are using a JavaScript framework that is widely adopted and has a solid community and enterprise interest with a great foundation. If you are not using jQuery, then I would strongly recommend using it for your next projects. I strongly believe that jQuery is the future of JavaScript and web development in general. Happy jQuerying!! -Taz Blog: http://bit.ly/tazblog Twitter: @mabdeali