Hi Andreas,

This is exactly why using the Command pattern a la gwt-dispatch is
recommended :-) You can use a servlet filter for basic centralized handling
such as authentication or have all your service impls extend a base class
that extends RemoteServiceServlet, but those are the only ways I know of to
get the low-hanging fruit.

/dmc

On Fri, Jul 1, 2011 at 3:11 AM, andreas_b <andreas.borg...@gmail.com> wrote:

> Hi all.
>
> I'm currently working on a project that has both client side and
> server side components. The server side code and the RPC services have
> already been defined and implemented by one party and my team is now
> about to develop the client side GWT app.
>
> I have previously worked on projects where we used gwt-presenter and
> gwt-dispatch using a Command pattern style for RPC. However, in this
> project the services have been implemented more as an API with named
> methods that each maps to underlying DAOs.
>
> We are now looking at how to implement client side caching and other
> centralized request/response handling around the RPC services. The
> problem we're having is that there are a large number of service
> methods defined, as opposed to one execute() method that you typically
> find when using dispatch/Command pattern. Hence, it is not straight
> forward as to how we would hook into these services and implement
> caching and other generic handlers without re-writing the services and
> it's server side implementation.
>
> We have something like 3 services each looking like this.
> Service
> methodA(...)
> methodB(...)
> methodC(...)
> ...
>
> What is the best or preferred way to wrap or hook into these calls to
> provide caching and any other generic handling we may want to provide?
> It doesn't seem very efficient to wrap the services and hook into each
> separate method. We are looking to solve this client side rather than
> re-writing the server-side implementation.
> Note that the server-side component was implemented without our
> involvement.
>
> Thanks in advance.
>
> Andreas
>
>
>
> --
> 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.
>
>


-- 
David Chandler
Developer Programs Engineer, GWT+GAE
w: http://code.google.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

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