Click here to check my latest exciting videos on youtube
Search Mallstuffs

Flag Counter
Spirituality, Knowledge and Entertainment


Locations of visitors to this page


Latest Articles


Move to top
Ways of implementing AJAX
Posted By Sarin on Mar 12, 2012     RSS Feeds     Latest Hinduism news
2851 Views

Ways of implementing AJAX or first approach to ajax For those who don’t know, Dot net developers have two ways to implement Ajax functionality in your ASP.NET website.
  1)    By using normal HTML/XHTML and CSS and XMLHTTPRequest.
2)    Secondly, by using Ajax controls provided by Microsoft which are built on top of the framework provided by the first one.
    I will be giving example of both techniques in my tutorials but let us first know the difference between the two and also know which one you should use in your website.
Pros of first approach:
  
1)    Execution will be much faster compared to Microsoft Ajax controls.
2)    No need of installing any toolkit or using any third party control or DLL’s.
3)    Will execute on almost all the browsers.
4)    From coder’s point of view, you will understand how Ajax exactly works.
      5)    Can make HTTP requests using any type (GET, POST, PROPFIND, and so on)
6)    Supports full control over POST requests, allowing for any type of data encoding
    Cons of first approach:
  1)    Limited intellisense support unless you use any third party product.
2)    Coding will be very difficult and time-consuming for complex requirements.
      3)    Requests ActiveX to be enabled in case of old browser
4)    Can make extra entries in browser history (depends on browser and implementation) in case of iframe implementation
    Pros of Microsoft Ajax:
  1)    Coding made quite easy by using Microsoft provided Ajax controls and intellisense support.
      2)    Ajax library provides an infrastructure to build either visual or non-visual JavaScript components. A global JavaScript object - Sys.Application - is responsible for managing the lifecycle of client components.
3)    JavaScript extensions -An enhanced type system is introduced to emulate object-oriented constructs such as namespaces, classes and interfaces; and to perform reflection on client types.
4)    Abstraction API-Common operations on the DOM (retrieving elements, setting styles and other manipulations) are automatically translated by the library into browser-specific calls.
5)    Application Services - The library allows accessing the ASP.NET Membership, Authentication, Roles and Profile services from the client side.
6)    Template Engine - Allows displaying data on the client side by using HTML templates and a custom binding notation. This approach avoids performing page rendering on the server side
7)    Declarative instantiation of client components - Allows registration, instantiation and configuration of client components using markup code, without writing any imperative JavaScript code.
    
Cons of Microsoft Ajax:
  1)    Needs latest version of browser. Does not work on old browsers.
  • Microsoft Internet Explorer (>= 6.0)
    • Mozilla Firefox (>= 1.5)
    • Opera (>= 9.0)
    • Apple Safari (>= 2.0)
    • Google Chrome
            2)    All controls are highly abstracted and hence you may not understand the inner functionality of each of these controls. Hence, less learning from coder’s point of view. However, user can go through the source code provided by Microsoft for each of this controls.
    3)    Some of the Ajax controls are not highly optimized and may affect the performance of your website.
            Ex: Update Panel sends all the viewstate back and forth for each user requests. Also, all the page life cycle events get executed thus affecting performance.
      4)    Limited readymade Ajax Controls Available. If your functionality is quite complex and is not present in any of the existing Ajax controls, you may have to switch to  the first approach or have to extend the existing ajax controls.
        
  • Note: Images used on this website are either a production of Bhaktivedanta Book Trust(https://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
    Do plants feel pain or sufferings
    Get Data of other page on current page
    How Silverlight works internally
    Science in hinduism-Embryology in Garbhopanishad and Charaka samhita
    Get set field, Properties,events or method using reflection
    Swastika in american antique greeting cards
    What is Silverlight,its features and how it works
    Get Set Value of any HTML element using jquery-Val function
    Calling silverlight methods from javascript
    Science in Hinduism-Theory of perception

    Post Comment