Using Ajax.NET to create a real time user interface
With any web application there will need to be requests made to the web server to get the latest versions of dynamic data. In an application like bttlxeMail Webmail every little action requires data to be retrieved from the server. Selecting a message, flagging a message, checking for new e-mail, managing contacts, notes, calendar, meeting requests, etc - all of that data needs to be retrieved from the server. Typically each request would be sent back to the web server and a new HTML page returned to the user’s browser with the updated content. For a data-intensive system like ours though such an approach would introduce a serious performance problem, both putting stress of the server and causing long delays for the user.
This is where AJAX comes in. An acronym for Asynchronous JavaScript and XML, AJAX is not a new technology but rather the collaboration of a number of existing technologies such as javascript, DHTML and XMLHttp communications. Internet browsers are today developed enough to provide wide support for these technologies making AJAX a viable option for developing web applications.
In basic terms, AJAX allows us to make a request to the server for data, retrieve the response and process it without reloading the web page. Look here for more information.
Read full article at http://weblogs.bttlxe.com/bttlxeMail/archive/2005/07/27/150.aspx
3 Comments
Comments have been disabled for this content.
Dave T. said
What do you do in situations where you can't create the xmlhttp object? It is an activex control afterall and overzealous administrators may lock a user out.
Do you failover to a script only approach?
Michael Schwarz said
@Dave: There are only a few companies that have disabled the safe ActiveX controls. I'm working on a version that will work without any ActiveX object. With Internet Explorer 7 we will get a native JavaScript object like today in Firefox, Opera or Safari.
Steve said
"With Internet Explorer 7 we will get a native JavaScript object like today in Firefox, Opera or Safari"
Ah , excellent!!!
This has been a major issue. Of Course, getting users to upgrade will be an issue.
Michael - I have question as well:
I like to use Datagrids to display info - in particular with templates. I have several 'home made' AJAX setups where I do a render of the datagrid, stream is back and display it.
How would using your AJAX.library help me with this?
My setup is asp.net 1.1, my current implementation is very similiar to the 2.0 - I use an interface and 'RaiseCallBackEvent' function.