My last post used the onKeyUp DOM event to trigger a Javascript function that calculated the cost of a number of items. The code in the picture to the right changes the text inside a textbox when the user selects (highlights) the text inside the box. Client-side scripts (scripts that execute in the user's browser rather than on the web server) aren't the only use of DOM events though. You can also launch server-side functions by triggering a postback (causing all or part of the page to reload) using the __doPostBack() method.
The issue with using __doPostBack() method is that it causes the page to reload, which interferes with the user's display. AJAX allows us to get around that by doing asynchronous updates, or updates independent of page loads. AJAX is a name that you hear a lot in the development world. It's actually an acronym that means Asynchronous Javascript and XML. It works by using Javascript to access DOM events and the XMLHttpRequest object to access data. While AJAX is often referred to as a single technology, it is actually a combination of HTML, XML, Javascript, CSS, JSON, and other technologies. You can learn more about AJAX and the underlying technologies it uses in this Wikipedia article.
As someone who develops a lot of data driven applications, I make pretty heavy use of tools developed using AJAX, such as the ASP.NET AJAX Controls Toolkit. I've also supported projects implemented using Telerik RadControls as well as those using Infragistics ASP.NET Controls. All of these tools offer methods to asynchroneously access data and server side functions without reloading entire pages.
In addition to providing key functionality in AJAX, Javascript is one of key components that make new features in HTML 5 and CSS3 possible. In fact, many developers use toolkits developed using Javascript such as modernizr to support older browsers when they implement those features.
I hope you can get a feel from this article about the important role that Javascript plays in web development today. It allows developers like myself, as well as designers to create web sites that are attractive and rich with both data access and user-interactive features. In the eighteen years since its creation in 1995, I would argue that few technologies have had as large of an impact on web development and the internet as a whole as Javascript.
The issue with using __doPostBack() method is that it causes the page to reload, which interferes with the user's display. AJAX allows us to get around that by doing asynchronous updates, or updates independent of page loads. AJAX is a name that you hear a lot in the development world. It's actually an acronym that means Asynchronous Javascript and XML. It works by using Javascript to access DOM events and the XMLHttpRequest object to access data. While AJAX is often referred to as a single technology, it is actually a combination of HTML, XML, Javascript, CSS, JSON, and other technologies. You can learn more about AJAX and the underlying technologies it uses in this Wikipedia article.
As someone who develops a lot of data driven applications, I make pretty heavy use of tools developed using AJAX, such as the ASP.NET AJAX Controls Toolkit. I've also supported projects implemented using Telerik RadControls as well as those using Infragistics ASP.NET Controls. All of these tools offer methods to asynchroneously access data and server side functions without reloading entire pages.
In addition to providing key functionality in AJAX, Javascript is one of key components that make new features in HTML 5 and CSS3 possible. In fact, many developers use toolkits developed using Javascript such as modernizr to support older browsers when they implement those features.
I hope you can get a feel from this article about the important role that Javascript plays in web development today. It allows developers like myself, as well as designers to create web sites that are attractive and rich with both data access and user-interactive features. In the eighteen years since its creation in 1995, I would argue that few technologies have had as large of an impact on web development and the internet as a whole as Javascript.