Hi Bruno,
            well you've made a lot of progress, so congratulations.

I think we need to overcome a basic misconception before going further....

On the server side, you should only have ONE project, a combined GAE and
GWT project, not two.
No need to copy classes and files between projects, etc.
Just think about appengine being the application server that runs your GWT
(Javascript) web app.....as if it was TomCat or some other app server.

The only difference over a "GAE only" project is that the GWT compiler will
generate JavaScript for you (from your Java code in your /client subfolders
for each GWT Module), and if you use GWT-RPCs, then you will have server
side code and should include the GWT jars (gwt-user.jar) to receive those
RPC requests and respond to them.

To "load" your GWT generated javascript you just need to add a normal
<script> tag in your html files to the JS loader generated by GWT compiler.
All that is described in the GWT documentation.

You should be able to build that project to your /war folder (compiled
.class files for GAE code, any jsp or html files, web.xml deployment
descriptor, appengineweb.xml descriptor, and loader JS files and
sub-folders for each GWT Module you compile, etc etc).

Then you can run it all locally with the devserver. Make sure that works
before deploying.

Then deploy that project's /war folder to appengine (App engine deploy
tools do this for you, packaging your /war folder and uploading).

You should be able to find MANY examples of such a combined project on the
web, including the developer samples.
Here are some:
http://www.gwtproject.org/doc/latest/tutorial/appengine.html
https://code.google.com/p/gwt-examples/

Andrew


On Sat, Feb 15, 2014 at 12:51 AM, Bruno Brito
<hypocrisy.rema...@gmail.com>wrote:

> Andrew Mackenzie,
>
> This is what I've acomplished so far:
>
> - Created my entity class with JDO annotations.
> - Created Endpoint class using GPE.
> - Created Client Endpoint Libraries using GPE.
> - Deployed to App Engine.
> - Created an Android App, imported the necessary client libraries and I
> was able to do basic CRUD operations on my datastore.
>
> GREAT!
>
> Now comes the GWT part. Here's what I've done.
> First, I used my backend project with the APIs, created a simple HTML file
> and used Google Cloud Endpoint support to Javascript to create and use some
> CRUD operations. Succeed.
>
> My next step was to copy my endpoint classes and libraries to my GWT
> project and depploy it to my App Engine account.
> I tested my Android App and had success with my crud operations.
>
> But now comes the problem. I don't have access to my HTML file to make the
> CRUD. I had to insert the Javascript code directly to my Java code of GWT.
> And no matter what I tried, I simply didn't succeed.
> Is there an easier way to do this? Because Google Cloud Endpoints supports
> Javascript client. I know GWT is basically JS, however, it doesn't sound
> that trivial to me.
>
> Do you have any sample or tips?
>
> Once again, thank you very much.
>
> Em terça-feira, 11 de fevereiro de 2014 17h47min19s UTC-2, Andrew
> Mackenzie escreveu:
>>
>> No worries. I mean one server wepapp (GAE plus GWT) that exposes an API
>> to your Android app. You might want to chose JSON for API format and use
>> gson library in GAE and Android projects.
>>
>> The Google Cloud Platform Mobile Backends Starter Project might be a good
>> learning ground as it generates GAE and Android projects for you.
>>
>> See my post at
>> http://devcon5.blogspot.com.es/2013/12/google-cloud-
>> platform-mobile-backends.html
>>
>> If you structure by our code just right, you can have one Pure Java
>> SHARED project (eclipse, would be a module in IntelliJ or maven) that is
>> used by main Android app project and by GAE/GWT webapp project.....but
>> maybe not worthy your effort. It can have common model objects....but you
>> might want to JDO annotate on GAE and not on Android - that will break
>> Android compile.... :-(
>>
>> If you dont use Endpoints or some other library to help you create  REST
>> API then in your GAE project you will have to implement API using servlets
>> mapped to paths (in web.XML) that your Android client uses.
>>
>>  --
> You received this message because you are subscribed to a topic in the
> Google Groups "Google Web Toolkit" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/google-web-toolkit/UtGnEusj0ig/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to