5 MORE Reasons to use jQuery
I previously wrote a post about 5 reasons to use jQuery but I felt like I was skipping some key points. Here are 5 MORE reasons to use jQuery:
1. Separation of Code from Content
One of the key design principles for good developers is separation of code from content. Adding new Javascript functionality is much easier when it’s all in one place instead of embedded within HTML tags strewn across many pages. This also makes updates much easier since you don’t have to worry about a massive Search/Replace.
2.Usability, User Interaction
Whether dynamically adding row striping, an animated dropdown, a date picker, or a rotating banner, jQuery allows you to go beyond HTML/CSS and add progressive enhancements which make sites easier to use. I would take this one step further and say a good UI with appropriate Javascript can make sites a joy to use.
3. Efficiency: “Write Less, Do More”
The ethos “Write Less, Do More” is one I will gladly get behind. With jQuery, there is a shorthand which allows you to quickly do things in the DOM. Here’s what should be a familiar example which applies to all PAS sites:
jQuery(document).ready(function(){
jQuery(".pas_data_table tbody tr:even").addClass("alt");
});
And when starting with Javascript, it’s much easier to debug a few elegant lines of jQuery code than the standard Javascript alternative.
4. Designer Friendly Markup
One of the things that got me into using jQuery versus other libraries was that it immediately made more sense. Given the example above, it’s pretty understandable even for a novice. Basically, this is how it works: “select the even table rows of a ‘pas_data_table’, add an ‘alt’ class”.
5. It’s a Standard
With companies like Google, Amazon, Twitter, Dell, NBC, ESPN and Twitter using it, you can be fairly certain it won’t be going away anytime soon. The large community and mass adoption will ensure this framework’s continued growth and development for years to come.
Leave a Reply
Want to join the discussion?Feel free to contribute!