Wednesday, November 30, 2011

Re: Setup Database Access in Development Mode

I also fairly new to GWT. I found the following tutorial to be
helpful, however, it is 4 years old so you will have to modify some
code to make it work. I suggest downloading the project file and work
through the tutorial. You will need to change some things such as the
location of your GWT SDK. It is also specific to the use of Apache
Geronimo as an application server.

Part 1:
http://www.ibm.com/developerworks/opensource/tutorials/os-ag-gwt1/

Part 2:
http://www.ibm.com/developerworks/opensource/tutorials/os-ag-gwt2/

As far as testing connectivity to the database, you can test whether
or not your computer can connect to the database is to install the
Eclipse data tools plugins, if not already installed. The "Data
Source Explorer" allows you to set up a connection to your database
that will allow you to not only confirm that you can connect to it
from your workstation, but also provides schema information, etc.

If you want a pure JavaScript implementation of your database lookup,
you will need to use the xmlhttp function. Here's a good example of
its use:

http://www.w3schools.com/php/php_ajax_database.asp

This requires you to write some sort of code on the server side to
actually execute the SQL query and return the data. I used a Perl
script, but you can use any language you like. Making this work can
be a challenge at first and it has a lot more overhead than using an
application server and database pool (illustrated in the IBM tutorial
above).

--
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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment