Gmail vs. Grendel #
About the Gmail engine and protocol
Whenever you log in to Gmail, a copy of the UI engine is loaded into one of the HTML page frames and remains there for the duration of your session. [...] HTTP requests to the Gmail server return the “DataPack”, a base HTML file that contains only JavaScript array declarations that the UI engine parses and then uses to determine what to update.
This journal, on December 12, 1999:
The main thing that I've done with Grendel was do implement the hybrid JavaScript/Perl system. When getting the messages from the server, the script generates a JavaScript which creates new JS objects (in the buttons frame). Then I have a local array of Message objects. To display them, I simply loop over them and call their Display method. The idea here is that if I want to change the sorting method, I can do all of it locally, instead of having to go through the server. Things like deleting messages are faster too. Instead of having to get the new message list from the server, I can delete the specified array memeber locally, and then tell the server which messages has been deleted, and update the message view page with the next one.
If only I could've told my 18 year-old self that my approach was to be validated by a company such as Google. I'm not sure whether it's a good thing (the platform is stable) or bad thing (the platform is stagnating) that 5 years down the line the best practices for web apps haven't changed all that much.
Post a Comment