There are many technologies used in the world to develop a applications, but instead of developing applications the greatest challenge is to make an application quick, reliable, user friendly and responsive.
I have written these series of articles by focusing on both beginners and experienced people so at the end of this year you will see all the Ajax and Ajax Control Toolkit Examples in one roof. So let us begin the journey with the first part.
Problems in traditional web Applications
- Many round trips to the server.
- Rendering of webpage is slower.
- Increases the consumption of server resources.
- Response time of application is very slower.
- Rendering of data is static.
- Data is updated of an application only when the user clicks on the browser refresh button.
So the preceding is some of the basic problems related to the traditional web application so to overcome these problems Ajax is the best alternative. So let us start with the basics.
What is Ajax ?
AJAX allows web pages to be updated asynchronously by exchanging small amounts of data with the server behind the scenes. This means that it is possible to update parts of a web page, without reloading the entire page.
We can also define Ajax is a combination of client side technologies that provides asynchronous communication between the user interface and the web server so that partial page rendering occurs instead of complete page post back.
Using Ajax technologies we can observe in Google Maps, Gmail, YouTube, and Facebook tabs.
I hope you have understood the basic concepts of Ajax. Now let us see the following diagram showing how Ajax works:
AJAX is Based on Internet Standards
Let us know about the basic information each technology uses in Ajax.
1. XHTML and CSS
XHTML (or HTML) is used for providing the markup tags, as used in any typical web site. In addition, we utilize CSS for extra styling functionality in relation to presentation and layout. XHTML is a stricter and more standardized form of HTML, which follows the rules of XML such as the requirement for well-formatted and valid against a schema or DTD.
2. Document Object Model (DOM)
The Document Object Model is a platform and language independent standard object model for representing HTML or XML.
XML is typically used as the format for transferring data between the server and the client. Using XML we can represent any applicable data object structure we might wish to represent.
I hope you have understood the basics concepts of Ajax. Now let us discus the relation between Ajax and ASP.Net Framework.
Ajax and ASP.Net Framework
ASP.NET AJAX integrates client script libraries with the ASP.NET 2.0 development framework. This new Web development technology extends ASP.NET, offering the interactive user interface benefits of AJAX with a programming model that is more familiar to ASP.NET developers, making it very easy to add AJAX to your applications quickly and with minimal effort.
Power of Ajax
- The power of AJAX lies in its ability to communicate with the server asynchronously, using a XMLHttpRequest object without requiring a browser refresh.
Everything happens behind the scenes with a minimum request and response cycle without the knowledge of the user.
Advantages of AJAX based application
- Improved application performance by reducing the amount of data downloaded from the server
- Rich, responsive and Slick UI with no page flickers
- Eliminates frequent page refresh which usually happens in a typical request/response model (Everything is updated on fly)
- Easy to implement as there are variety of AJAX implementations available around
- AJAX mechanism works behind the scene nothing much required from user perspective
- Works with all browsers
- Avoids the round trips to the server
- Rendering of webpage faster
- Decreases the consumption of server resources
- Response time of application is very faster
- Rendering of data is dynamic
So let us start with the basic concepts of Ajax Extension which comes with the ASP.Net Framework.
Using Ajax Extension
The following are the most commonly used Ajax controls in an ASP.Net Application which comes with the ASP.Net Framework and available under the Ajax Extension tab of ASP.Net Toolbox present at the left hand side of Microsoft Visual Studio framework.
These controls are: