.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal

Home >> Articles >> ASP.NET >> Post New Resource Bookmark and Share   

 Subscribe to Articles


Posted By:Ruchi       Posted Date: February 26, 2009    Points: 10    Category: ASP.NET    URL: http://www.dotnetspark.com  

jQuery is a JavaScript library (or framework), created by John Resig in 2006.

jQuery Vs JavaScript in terms of speed?

jQuery is a web development framework that is written in JavaScript and therefore cannot be "faster" than JavaScript. However, jQuery certainly makes your code much more elegant. jQuery uses CSS-like selectors (the space, the pound sign, the dot and the greater than sign) to select a set of desired elements and apply any function to them. If you are curious about how jQuery does this, the source code is available at their website as a regular js file and does not contain anything that you would not expect from JavaScript. The developers of MooTools have created a page that demonstrates performance of several JavaScript frameworks that inlcudes jQuery. jQuery is a very well-designed framework and it is no surprise that it scores high among the top frameworks as the MooTool's CSS Selector Speed Test page demonstrates that.

Which one is better either jQuery or JavaScript?

This is a good question. This really depends on the circumstances and what kind of things you are working on. I see that the web-based applications that assume heavy-traffic bandwidth will benefit from jQuery's size. All, or at least most developers will obviously benefit from jQuery's syntax, short learning curve, and the logical way in which jQuery works (it is possible to create multi-chained statements where each member function returns a jQuery object for the element you are working with, so that you can apply additional code to the elements that are returned). On the other hand, for projects where bandwidth volume plays little role, regular Javascript code may be used if the programmed doesn't feel comfortable with using jQuery yet. Having said this, it is difficult to go back to "regular" JavaScript programming once you have experienced front-end web development with jQuery, especially if you are working with a lot of dynamic elements in your project.

jQuery Vs Prototype?

There is a heated debate in the Web Developer community as to which framework is better, and which one to choose for your own projects. The answer to this question is not simple due to the increasing number of different JavaScript frameworks, their feature sets, the learning curve, the .js file size for websites that care about bandwidth and finally, the script execution speed (in particular the CSS-selector algorithms). It seems that quite a few people who started with the Prototype library are now baptising to jQuery for a few of those reasons. That's not to say that jQuery is better than Prototype or vice versa. There is simply no "best" JavaScript framework, and it is the choice that is left to the developer. It seems that once you learn jQuery it is difficult to make a different choice. There are probably less people who have converted to Prototype from jQuery.

Ref http://www.learningjquery.com/

 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend