I've tried to be fair with this blog in terms of SWT/Swing, Web Apps/Rich Client, etc. In that tradition, here is an analysis of the way GMail is constructed by John Wilger. I've not looked at the nuts and bolts of GMail myself, but assuming he's correct this looks like a good way to handle web based applications. Excerpt:
When you request the application from the server, almost no HTML is actually loaded by your web browser. Instead, the browser loads an extensive Javascript library that is capable of rendering any interface elements needed by the application. Then, the browser executes a Javascript Init (initialization) routine that communicates with the server via Javascript's XMLHttpRequest object (in MS Internet Explorer, it actually uses an ActiveX object). The server then sends the client-side application a set of instructions for rendering the interface. The Javascript application also communicates with the server using the same method in response to interface events in order to update the view accordingly. Rather than passing HTML snippets to the client (or even regular XMLRPC data), Google designed a custom messaging structure. (Johnvey Hwang takes a look at that messaging structure
1e00
—among other things—in an article about the Gmail API.) The result is an excellent application of the MVC (Model View Controller) design pattern that implements a rich client-side application interface inside your web browser.