Re: Exposing RequestContext methods to non-GWT clients.... (newbie question)...

2010-12-20 Thread Ramon Buckland

Hi Richard,

You need to consider what protocol your clients are going to "use" the
GWT-like interface with.
That is, do yuou want the client to "talk" GWT ? if that is the case,
they can just talk to the GWT Servlet
However if it's SOAP, or REST or something else, you have to make that
happen

As an example, if SOAP, I would create at the core, an interface that
represents what you want to expose to your clients.
And keep GWT doing what GWT does.


ie:
  public interface CommitmentService {
// the bunch of methods off the DOmain object that you want to
expose.
  }


 Create an implementation that utilises the domain object and the
interface

  public class CommitmentServiceImpl implements CommitmentService {

   // call to a static method
   public void foo() {
Commitment.foo();
   }
  ..
  }

Doing this, keeps the two separate. You can expose, using the
interface your service class out via SOAP etc (using Spring and
stuff).

hth.


On Dec 17, 6:18 am, Richard Berger  wrote:
> In building very simple "learning application" using GWT-RPC and then
> RequestFactory, I was wondering whether it was possible to expose the
> methods that are in my RequestContext interface (in the RequestFactory-
> based app).  In particular, I have:
>
> public interface CommitmentRequest extends RequestContext {
>   // bunch of useful methods
>
> }
>
> These methods are obviously what my GWT client side needs to get the
> job done.  But now let's say I want some other type of client to
> access the same functionality that is provided by the "engine" (GWT
> server side).  Perhaps an iPhone client or an Android client, or some
> other application (Java, .Net, something else) wants to use my
> engine's capabilities.
>
> Is there some way to "expose" the methods in CommitmentRequest so that
> they can used from those other clients?  It seems to me that this
> would not be an uncommon request.
>
> I have started looking at the RESTlet project - but didn't want to go
> too far in case I was going in the wrong direction.
>
> Thanks so much for any guidance you can provide!
> RB
>
> PS - If it matters, I was also planning on hosting this on GAE and am
> using Objectify for persistence.

-- 
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-tool...@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.



Exposing RequestContext methods to non-GWT clients.... (newbie question)...

2010-12-16 Thread Richard Berger
In building very simple "learning application" using GWT-RPC and then
RequestFactory, I was wondering whether it was possible to expose the
methods that are in my RequestContext interface (in the RequestFactory-
based app).  In particular, I have:

public interface CommitmentRequest extends RequestContext {
  // bunch of useful methods
}

These methods are obviously what my GWT client side needs to get the
job done.  But now let's say I want some other type of client to
access the same functionality that is provided by the "engine" (GWT
server side).  Perhaps an iPhone client or an Android client, or some
other application (Java, .Net, something else) wants to use my
engine's capabilities.

Is there some way to "expose" the methods in CommitmentRequest so that
they can used from those other clients?  It seems to me that this
would not be an uncommon request.

I have started looking at the RESTlet project - but didn't want to go
too far in case I was going in the wrong direction.

Thanks so much for any guidance you can provide!
RB

PS - If it matters, I was also planning on hosting this on GAE and am
using Objectify for persistence.

-- 
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-tool...@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.