Search Mallstuffs

Flag Counter
Spirituality, Knowledge and Entertainment




Latest Articles


Move to top
Jquery features, Advantages and disadvantages
Posted By Sarin on Mar 09, 2012     RSS Feeds     Latest Hinduism news
13722 Views

Simple Ajax Example and ajax Client server communication What is JQuery
JQuery is lightweight, client side JavaScript library file that supports all browsers. JQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animations, and Ajax interactions for rapid web development. JQuery makes it easy to play with the DOM, add effects, and execute Ajax requests. 
JQuery helps developer reduce lines of code while they program. For example huge code written in Java Script can be written in one or two lines of code using JQuery as it uses pre compiled JavaScript library internally. For example: finding a Div element with a specific class xxx, can be done using custom JavaScript by looping through all DOM elements, write if statement checking the class then write the code to manipulate cross browser.  But this all can be done by using JQuery with only 2 lines of code.
  


Advantage of Jquery:  

Cross Browser Compatibility:
Cross browser compatibility is a major problem in AJAX/JavaScript programming. For example, a website may work perfectly in opera but may not run in Mozilla 7.  JQuery developers were aware of all this browser issues and they also knew the reason behind these inconsistencies. Hence, they have documented these solutions in the library by fixing all these problems to make sure whatever code you write, web pages look same across all browsers.
   
Lightweight and Fast: To keep the JQuery library lightweight, a lot of functions have been omitted and some are transferred to the plug-in section. If you want any particular feature on a page, you can add these plug-in in the website. This keeps the coding at a limited level and saves bandwidth for faster loading. The JQuery core library is only 24 kb in size. That makes it very easy to add in the applications and hence, improves the performance of the web application

Open source library:  it’s an open source library, free and well supported across all types of applications. Therefore, anyone can use JQuery in their application without any compatibility and licensing issues. Also, Microsoft has integrated JQuery officially into its IDE Visual Studio 2010 and JQuery intellisense is well supported in Visual Studio 2010 now
  
Easy to Learn and Flexible: JQuery is very compact and easy to understand. Fact is, even if you have basic knowledge of coding, you can start writing JQuery very easily after going through a short tutorial.
  
Lots of extendable and reusable Plug-ins: The JQuery team has kept the plug-in creation process simple. They have given a framework for extending the library. You can develop your own customized plug-in, use it in JQuery projects, and share it with fellow developers. In the case you don’t want to create plug-ins, there are hundreds of high quality plug-ins available for download to do your work.
  
CSS3 Selectors Compliant: JQuery completely supports the CSS3 selector requirements. You can learn and start using CSS3 selectors in your production code right away.
  
DOM traversal manipulation:  Dom Traversal Manipulation is made very simple and easy with JQuery. DOM manipulation like adding new elements, removing elements, traversing across elements etc with querying and chaining is extremely Wonderful & Robust.

Cool Effects and animations:  very cool animations like fade-in/fade-out expand/contract etc can be achieved very easily on any element with couple of lines of code.
Utility Features: JQuery offers utility functions that help coding string trimming, iteration, array manipulation and much more. These functions offer seamless integration between JQuery and JavaScript. It makes the code writing process easier and hassle-free.
  
JQuery User Interface: JQuery UI offers accordions, sliders, dialog boxes, date pickers, and many more features. All of them are ready to use. The UI controls are configurable and you don’t need to spend any extra time in building these features. However, for .Net developers, all these utilities are available in Ajax too.

The Whole World is Embracing JQuery:
Various IT behemoths on web have already accepted JQuery. Companies such as IBM, Microsoft and Google are using JQuery. Microsoft even included JQuery with its MVC framework and is working with the open-source JQuery project to add new features to the JQuery library

Disadvantages of JQuery
  Functionality maybe limited
While JQuery has an impressive library in terms of quantity, depending on how much customization you require on your website, functionality maybe limited thus using raw JavaScript maybe inevitable in some cases.
    Features of Jquery  
  The jQuery library provides a general-purpose abstraction layer for common web scripting, and is therefore useful in almost every scripting situation. Its extensible nature means that we could never cover all possible uses and functions in a single book, as plug-ins are constantly being developed to add new abilities. The core features, though, address the following needs:
      
  • Access parts of a page. Without a JavaScript library, many lines of code must be written to traverse the Document Object Model (DOM) tree, and locate specific portions of an HTML document's structure. jQuery offers a robust and efficient selector mechanism for retrieving exactly the piece of the document that is to be inspected or manipulated.
  • Modify the appearance of a page. CSS offers a powerful method of influencing the way a document is rendered; but it falls short when web browsers do not all support the same standards. jQuery can bridge this gap, providing the same standards support across all browsers. In addition, jQuery can change the classes or individual style properties applied to a portion of the document even after the page has been rendered.  
  • Alter the content of a page. Not limited to mere cosmetic changes, jQuery can modify the content of a document itself with a few keystrokes. Text can be changed, images can be inserted or swapped, lists can be reordered, or the entire structure of the HTML can be rewritten and extended-all with a single easy-to-use API.
  • Respond to a user's interaction with a page. Even the most elaborate and powerful behaviors are not useful if we can't control when they take place. The jQuery library offers an elegant way to intercept a wide variety of events, such as a user clicking on a link, without the need to clutter the HTML code itself with event handlers. At the same time, its event-handling API removes browser inconsistencies that often plague web developers.
  • Add animation to a page. To effectively implement such interactive behaviors, a designer must also provide visual feedback to the user. The jQuery library facilitates this by providing an array of effects such as fades and wipes, as well as a toolkit for crafting new ones.
  • Retrieve information from a server without refreshing a page. This code pattern has become known as Asynchronous JavaScript and XML (AJAX), and assists web developers in crafting a responsive, feature-rich site. The jQuery library removes the browser-specific complexity from this process, allowing developers to focus on the server-end functionality.
      
  • Simplify common JavaScript tasks. In addition to all of the document-specific features of jQuery, the library provides enhancements to basic JavaScript constructs such as iteration and array manipulation
      
      With the recent resurgence of interest in dynamic HTML comes a proliferation of JavaScript frameworks. Some are specialized, focusing on just one or two of the above tasks. Others attempt to catalog every possible behavior and animation, and serve these all up pre-packaged. To maintain the wide range of features outlined above while remaining compact, jQuery employs several strategies:
            
    • Leverage knowledge of CSS. By basing the mechanism for locating page elements on CSS selectors, jQuery inherits a terse yet legible way of expressing a document's structure. Because a prerequisite for doing professional web development is knowledge of CSS syntax, jQuery becomes an entry point for designers who want to add behavior to their pages.
    • Support extensions. In order to avoid feature creep, jQuery relegates special-case uses to plug-ins. The method for creating new plug-ins is simple and well-documented, which has spurred the development of a wide variety of inventive and useful modules. Even most of the features in the basic jQuery download are internally realized through the plug-in architecture, and can be removed if desired, yielding an even smaller library.
    • Abstract away browser quirks. An unfortunate reality of web development is that each browser has its own set of deviations from published standards. A significant portion of any web application can be relegated to handling features differently on each platform. While the ever-evolving browser landscape makes a perfectly browser-neutral code base impossible for some advanced features, jQuery adds an abstraction layer that normalizes the common tasks, reducing the size of code, and tremendously simplifying it.
    • Always work with sets. When we instruct jQuery, Find all elements with the class 'collapsible' and hide them, there is no need to loop through each returned element. Instead, methods such as .hide() are designed to automatically work on sets of objects instead of individual ones. This technique, called implicit iteration, means that many looping constructs become unnecessary, shortening code considerably.
        
    • Allow multiple actions in one line. To avoid overuse of temporary variables or wasteful repetition, jQuery employs a programming pattern called chaining for the majority of its methods. This means that the result of most operations on an object is the object itself, ready for the next action to be applied to it.
        
  • Note: Images used on this website are either a production of Bhaktivedanta Book Trust(http://www.krishna.com), Iskcon Foundation or were found in google search under "Free to use and share". If any of the images presented here violates copyright issues or infringes anyone copyright or are not under "Fair use", then please bring it to our notice. Read Disclaimer for more.

    Share this to your friends. One of your friend is waiting for your share.

    Related Articles
    How AJAX Works, advantages and disadvantages
    Ways of implementing AJAX
    How Silverlight works internally
    Working with server controls and HMTL controls
    Jquery features, Advantages and disadvantages
    Working with forms-Jquery form selector
    What is Silverlight,its features and how it works
    Creating your first application in JQuery
    Calling silverlight methods from javascript
    Working with canvas in silverlight

    Post Comment




    Software developer by profession,
    Poet by hobby,
    Blogger by Passion
    Birth Place: Munger, Bihar
    Residence: Mumbai, Maharashtra
    Prof exp: 8 years

    Read More about me

    Read my daily what'sapp quotes
    Most Viewed Articles

    Latest Spiritual Videos


    Latest Funny Videos

    Latest News

    Latest Social Post
    Latest WhatsApp Quotes