Thursday, April 26, 2012

Re: Connexion Google Web Toolkit to DataBase

some tips for getting started.

Install gwt and google eclipse plugins. Create a sample project as I explained in thread named "Difficulty to run simple GWT application". Now a note: GWT apps are "divided" in "client" and "server" parts. Client part is translated to javascript and executed in the browser. server part is java code that runs on the server (see client and server packages).

In the exmaple generated GWT RPC is used as the mechanism for client-server comunication.

You must retrieve the data from data base using some tool, for example [1] in the server side. In the generated example this is at class named org.test12.server.GreetingServiceImpl, method greetServer. Then when you have successfully retrieved the data from the database. you have to return it (in a type supported by gwt) to the client side, so your client GWT code can for example, print a table with results.

hope this help

p/d - you have lots of choices for accessing a database - here is an example of conecting w postgresql
[1] http://www.mkyong.com/jdbc/how-do-connect-to-postgresql-with-jdbc-driver-java/

Then in
On Thu, 26 Apr 2012 00:56:53 -0700 (PDT)
alaa aadil <aadilalaa@gmail.com> wrote:

> hello
>
> i'm new to google web toolkit , and i want to connect my database that
> i create it with PostgreSql to my application GWT , in order to
> display some information of my database .
>
> please if some one have an idea or an project exemple , please reply
> to my question .
>
> thanks
>
> best regards
>
> Aadil
>
> --
> 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.
>


--
Sebastian Gurin <sgurin@softpoint.org>

--
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