Why asynchronous? This is a classic examination question in data communications.
Why serializable? - another classic examination question. Classic - meaning that the professors in data communication would want to ensure you understand them before they would like you to be given a piece of paper to pass through the pearly gates of their academic institutions to make your contributions to the data engineering world. Asynchronous ========== Remember the days of pure JSP and HTML pages and absence of AJAX? You would have a page with multiple cells. Your user would need to fill up the page cells, click on submit. Then the page blanks off for a while. Sometimes it is longer than a while. Sometimes, you need to send an intervening page to say, "server still processing, please be patient". We used to ask, why couldn't we just send the request out without refreshing the page. Why can't the web page be allowed to continue to function while waiting for the response? For example, for a page displaying the price trend of a stock, when a request is sent to the server to refresh the stock price, I would like to continue being able to zoom in and out of the chart of its historical prices. In the old days, we would click on a submit button, the screen blanks off and we go get a cup of coffee and then the browser relents to display the page when the server finally sends its response. So asynchrony is a desirable condition, not a disadvantage. You may ask, why can't the browser display the response as soon as possible rather than wait asynchronously. The browser not displaying as soon as possible is not the fault of asynchrony. It is the fault of slow servers and faulty data cables - that we use asynchrony as a compensatory measure. If you don't like asynchrony, you could revert back to the old days of a blanked screen waiting for the server to respond. Or spend a lot of money upgrading your servers and data cabling. Serializable ======== Imagine Moses and the Red sea. Let us say that the angel opened up the a passage in the Red sea to allow only a single file of people to pass through. The Pharaoh's army is behind pursuing the Israelites and Moses has to make sure his people get across to the other side of the sea as quickly as possible. So the Israelites are now assembled according to tribe, and then by clan, and then by family. They stick together in that hierarchy. But the passage across the sea allows only one person row of people. So Moses has to break the tribes, clans and families up and marshal them into a single row of people. And then on the other side, he has to ensure they are able to reassemble them back into their tribe, clan and family hierarchy. You wouldn't want Moses faced with the situation of a child, on reaching the other side, crying "where is my mummy and daddy?", would you? There is a data communication channel between your browser (where you might be sitting in a cafe in Ougadougou) and the server (sitting somewhere in Mumbai). You might not be aware of that if you are on development mode where your browser, server and Eclipse sits on the same machine, wondering why can't they just pass objects to each other by sharing the computer's memory. But you are developing for a remote- to-remote situation where the data lines, in theory, require you to send your objects in a serial manner. By implementing Serializable, you are telling the data communication channel where to find the disassembling/serializing routines and then where to find the reassembly/deserializing routines for your object.Most classes already come with serializing/deserializing routines so you only need to implement Serializable, otherwise you would need to write the serializer/deserializer. If you are developing using the Google Plugin for Eclipse, you need to turn the GAE option off if you are not developing for GAE. When you develop for GAE, or any cloudified environment, your application needs its sessions to be allowed to shift from server to server across the world. That is how the cloud owner would like to optimise their resources and the response of your application. In order to facilitate that kind of shift, your objects need to be serializable. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.