Did you know that the XMLHttpRequest Javascript object is now supported in both Internet Explorer and Mozilla based browsers (e.g., Netscape and Firefox)? You can use the XMLHttpRequest object to make asynchronous requests to the server, and get back XML (or any other response in string format like plain text, javascript, etc.) responses that can be processed in the browser -- all using JavaScript and without having to replace the current page! This can be used for validations, fetching dependent drop-down values, checking for object state changes ... you name it. It allows you to build web applications that feel more like rich client applications. Interestingly, the technology has been around for a while, but it's usage in this way has only recently begun to take off in popularity. Icons/attention.png Cautionary Note: AJAX can make it very tempting to break the Model View Controller (MVC) pattern, and you can easily find yourself down a path where you have significant logic in javascript on the client. Make sure you are careful to keep all business logic on the server where it belongs, and limit your javascript code to presentation logic only.
Comments