GWT - Database Interaction

A GWT application in most cases interacts with the database on the server by making calls to the server code (Java). That code queries the database, or issues update statements. When the server sends back the result to the client application, the user's browser reacts as it's been programmed to react with the JavaScript.

Let's say the user has chosen a function to display a list of customers. JavaScript code makes a call to the server, indicating what it wants. The server queries the database and builds a list of records to send back. When the data reaches the browser, code is triggered indicating that the data is ready, and the JavaScript code then builds a list of the data to show to the user.