This time I will describe a CRUD application using GXT Grid and HttpProxy on the client side and on the server side I use PHP and PDO to access a PostgreSQL database.
The communication between client and server side is using JSON then you can use whatever language on the server side that produce a JSON output.
The source code is on github https://github.com/poseidonjm/GXT3-PHP is structured using GWTP and GWT Editor for binding.
GXT and HttpProxy
First of all the next interfaz and class are required
With GWT AutoBean is easy to serialize/deserialize GWT Objects to json and vice versa,
on the client side there is the UserProxy interface that represents the model
UserListProxy represent a set of users
With AutoBean the objects are created from a factory
GXT Grid use a reader to parse the output of the server.
Run the proyect
You have to start your Apache Server and enable the following extensions for PostgreSQL and PDO:
You have to set the root of your web server to the war of the project
for example I use XAMPP and change the httpd.conf
restart Apache Server.
Set the parameters of connection to database PostgreSQL in war/config/connect.php
I usually work on Firefox for GWT DevMode
Compile GWT code to JS
I compile GWT with Google Plugin for Eclipse GPE
By default the compiled JS code is compressed.
Then enter the url http://localhost/phpcrud.html#users
The Server Side PHP
I use simple PHP and PDO
Sorry if I am missing explain PHP code.
I hope you can use GWT with any backend and AutoBean is a nice feature of GWT.