Basically you COULD use php for backend - and instead of relying on
GWT-RPC, you could use a RequestFactory and push the objects around
using JSON or XML.
However I think it's a lot easier to develop backend services in Java,
because then you can manage you entire project within eclipse for
example and have your services implement given interfaces.

Request and implementation of those would go around like this:
 - you think of methods you need for a given action
 - you decide on services (e.g. I have things for recipes and items,
so I have two services: RecipeService and ItemService)
 - you decide on the methods you need (e.g. getRecipes(int from, int
amount) and other methods, each in their own Service)
 - you create your interfaces (you need e.g. IRecipeService and
IRecipeServiceAsync - there are lots of tutorials how to write/adjust
them)
 - you should make your backend service implementations
(RecipseServiceImpl) extend RemoteServiceServlet and implement the
interface you just created (IRecipeService)

Then in your class where you want to be able to make this call, you go
on like this:
        private final IBelongingsServiceAsync belongingsRPC =
(IBelongingsServiceAsync) GWT.create(IBelongingsService.class);

Now you can use belongingsRPC.getItemsOnCharacter(...) (that's just an
example) to get certain items. In my example getItemsOnCharacter is a
method declared within the interface and implemented in my backend.

Generally I wouldn't start learning Java by learning GWT, since GWT
does not support everything Java does and some things may work
differently when using Java.

Therefore - especially if you're familiar with php - you might want to
look at how to use RequestFactories and php for backend. It's imo a
bit harder (for instance when I tried it (must'Ve been around GWT 1.5
or so) it didn't work out for me, because I didn't know where to put
things) in my opinion.

If you still want to use Java for backend, I'd recommend to make it so
you can publish onto a tomcat-server, not the built-in jetty server. I
had a lot of trouble publishing the project outside of jetty. That's
why I decided to rework my project - and I am now developing on tomcat
(you can even pick that tomcat that comes with XAMPP if you're on
Windows).

As to the library question: it depends on whether you need
functionality that is not present in Java right-away. Basically the
only thing you need is the JDK (1.6 currently) - and when you publish
your application (including server-side), your server only needs to
have the corresponding JRE6. If you happen to use any additional
libraries (e.g. I use JDOM for XML-stuff), then you have to copy
the .jar-file into your "war/WEB-INF/lib"-folder and include it in
your build-path. There's also a library for handling mysql-stuff (it's
a mysql-connector and you can get it for free from Oracle).
Usually if you have a bigger application, then it makes sense to use
frameworks such as hibernate and/or spring (we use both at work,
because our application is really huge). These frameworks usually
automate things or make it easier to work with databases. Spring-
security for example also helps covering most vulnerabilities
automatically, so you don't have to keep track of it on your own.

However: I really recommend you start with the basics. It's a bad sign
if something seems to you rather automagical and you don't know what's
going on under the hood. This can make debugging (especially if
strange exceptions occur) a pain.

I hope it helps.

Igor.

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

Reply via email to