Home » Ajax and Websockets Explained

Share This Post


Ajax and Websockets Explained


Ajax stands for Asynchronous Javascript and XML. I don’t have a lot to say about Ajax at this time except to say that it has been a very important server enhancement which makes communications between the web client and web server more efficient. Ajax is a hack on the server that allows the server to send the web client a piece of a web page instead of resending the entire web page. This piece is easily handled by Javascript using the DOM (Document Object Model).

The DOM, of course, is the web page stored in a tree model in ram. Javascript may easily manipulate this DOM model on the client side and for example, update only the portion that is displaying data from a database table. I feel that Javascript and Ajax go well with Java technology. I think there is a book that I have to get titled “Java on Ajax”.

Web Sockets

However, as of Java 7 and Apache Tomcat 7, the web sockets standard has been implemented. Therefore I will not be learning Ajax for now or at least I see no reason. Javascript can be used with data sent via web sockets to update the DOM as easily as with Ajax as far as I know. See under the Java Menu and Web Apps Sub Menu, Java Web Sockets menu item for more info. Apache Wicket at wicket.apache.org is an API that allows you to use Ajax with Tomcat or possibly other servers.

Also, see The Javascript Language


Share This Post

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>