Ways of implementing AJAX
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.
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
Cons of Microsoft Ajax:
1) Needs latest version of browser. Does not work on old browsers.
Microsoft Internet Explorer (>= 6.0)
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.
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
Share this to your friends. One of your friend is
waiting for your share.
Simple Ajax client server Example
How Silverlight works internally
Ways of implementing AJAX
Science in hinduism-Embryology in Garbhopanishad and Charaka samhita
Get set field, Properties,events or method using reflection
Silverlight New features & system requirement
How AJAX Works, advantages and disadvantages
What is Silverlight,its features and how it works
Effects of chanting AUM or mantras
Get Set Value of any HTML element using jquery-Val function
Software developer by profession,
Poet by hobby,
Blogger by Passion
Birth Place: Munger
Read More about me
Read my daily what'sapp quotes