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

  • Home
  • SEARCH
  • 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 3798868
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T13:38:33+00:00 2026-05-19T13:38:33+00:00

Description I have a Parent GWT project that uses the gwt-maven-plugin. This project is

  • 0

Description

I have a Parent GWT project that uses the gwt-maven-plugin. This project is split into 2 sub-projects: Domain and WebApp and each project contains pom.xml files. I’d like to split the domain code from GWT client code.

Parent project

  • /Parent
  • /Parent/pom.xml

Domain project

[1] I think of of it as the server-side part of the application that runs on the server

  • /Parent/Domain
  • /Parent/Domain/pom.xml
  • …/beans/PersonBean.java
  • …/dao/PersonDAO.java
  • …/services/PersonService.java
  • …/util/DateUtil.java
  • …/gwt/client/GWTPersonService.java
  • …/gwt/server/GWTPersonServiceImpl.java
  • …/gwt/shared/GWTPersonDTO.java — a DTO(Data Transfer Object)

WebApp project

[2] I think of it as the client-side of the application that runs in the web browser.

  • Parent/WebApp
  • Parent/WebApp/pom.xml
  • …/gwt/client/PersonUI.java
  • …/gwt/util/GWTUtility.java – this is a utility class called by GWT components, it is not used on the server
  • …/webapp/WEB-INF/web.xml
  • …/webapp/Page.css
  • …/webapp/Page.html

Sequence diagram

alt text

PersonUI will call GWTPersonService’s methods which calls PersonService(I need this separation because PersonService.java will be called by non-GWT clients as well).

PersonService will call PersonDAO which uses and returns PersonBean instances. Then, PersonBean gets converted to GWTPersonDTO and sent to the client by GWTPersonServiceImpl.

Questions (edited)

  1. In which project should I put the shared GWT code that normally lives under /shared folder?
  2. Does it make sense to have GWTPersonServiceImpl.java and GWTPersonService.java in the domain project? My reason is that since all servlets live on the server, and the domain is for server-side then those classes should be in the Domain project.
  3. Should I move GWTUtility.java inside Domain project?
  4. Does it make sense to use DTO’s? Is there any way to make it more straight-forward: i.e. use directly the PersonBean?
  5. Is it possible to run this scenario in GWT Developer mode using maven? How easy is it to configure?
  6. If you have any modifications/additions to the above scenario, please post them – or even better if you have already done an app it would help much to know how you did to solve this separation.

Thank you!

  • 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-19T13:38:34+00:00Added an answer on May 19, 2026 at 1:38 pm
    1. I would put the shared code in a third project on which both Domain and WebApp can depend.
    2. Since GWTPersonServiceImpl is a servlet and runs on the server, not the client, it belongs in Domain.
    3. What function does GWTUtility perform? If it is only used on the client, it belongs in WebApp; if it is only used on the server then it belongs in Domain; if it is used on both then it probably belongs in a third project on which both WebApp and Domain depend.
    4. You can use a complex type as long as it (and its constituent types) implements either of com.google.gwt.user.client.rpc.IsSerializable or (with limitations) java.io.Serializable. See the GWT development guide for details. In any case, as designed, any serialized type in your project probably belongs in a module upon which both Domain and WebApp depend.
    5. Yes.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have xml that looks like this: <todo-list> <id type=integer>#{id}</id> <name>#{name}</name> <description>#{description}</description> <project-id
I'm having a hard time figuring this validation problem. I have one parent domain
I have a description field indexed in Lucene.This field contains a book's description. How
I have a select query that currently produces the following results: Description Code Price
After I messed up the description of my previous post on this I have
alt text http://img8.imageshack.us/img8/8558/classdiagram.png Short description: I have a doubt whether it's normal that AbstractCrudDaoImpl
I have this HTML: <div id=description> <h5>Title</h5> <p>First paragraph</p> <p>Second paragraph</p> <p>Third paragraph</p> </div>
I have a class that contains hierarchical data. I want to present this data
I have an XML feed that looks like this: <?xml version=1.0 encoding=UTF-8?> <productFeed version=1.0
I have a class with following description: public class Customer { public ISet<Client> Contacts

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.