Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 557633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:02:49+00:00 2026-05-13T12:02:49+00:00

I watched Google Web Toolkit Architecture: Best Practices for Architecting Your GWT App and

  • 0

I watched “Google Web Toolkit Architecture: Best Practices for Architecting Your GWT App” and I’m having trouble figuring out how the server side is supposed to work.

Slide 21 shows:

/** The name Command is taken */
interface Action<T extends Response> { }

interface Response { }

interface ContactsService extends RemoteService {
  <T extends Response> T execute(Action<T> action);
}

interface ContactsServiceAsync {
  <T extends Response> void execute(Action<T> action,
      AsyncCallback<T> callback);
}

I thought that meant I might be able to create

public ResponseSubclass execute(ActionSubclass action) { ... }

and gwt would choose that method when it matches my exact parameters, but it doesn’t. At the moment i’m using:

if (action.getClass().getName() == ActionSubclass.class.getName())
{
    return (T) execute((ActionSubclass)action);
}

but that means I have to keep adding ifs to that method every time I add an action and I have to use unchecked casts. Is there a better way to make this work?

note: from what I have read somewhere else, the command pattern would usually include the actions to be taken in the Ac subclass, but because this is passing a client object for the server take some action on, the execution of the action has to be separated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T12:02:49+00:00Added an answer on May 13, 2026 at 12:02 pm

    Checkout GWT-Dispatch and how to use it here.

    As an aside, this may be one of the best articles that references Ray Ryan’s IO talk and builds a Hello World app. The application uses GWT-Dispatch.

    -JP

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just watched Batch data processing with App Engine session of Google I/O 2010
I just watched Google Wave Keynote video on Google I/O and I must say
I just watched a Google tech talk video covering Polyworld (found here ) and
I've watched this video from Google I/O 2009: http://www.youtube.com/watch?v=AgaL6NGpkB8 where Brett shows microblogging example.
Yesterday I watched the screencast Writing your first Rx Application (on Channel 9) where
I just watched the Windows Azure intro video and it left me feeling like
I just watched the last Channel 9 vid on the upcoming parallel extensions to
I recently watched this youtube tutorial on the Null Object design pattern. Even though
We've seen and watched the videos on how large distributed teams are using Git,
I have read a lot of articles on Dependency Injection as well as watched

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.