Do you use one project for client and server side for GWT-based applications or for a separate project?

How do you have your GWT project setup? Do you have one project for the client side and a separate project for the server side? Can you share your experience with organizing projects for the GWT interface, spring backend system? I want to use spring + GWT + Tomcat + Hibernate for this project.

+4
source share
2 answers

If you really have a good reason to split the client and server sides into several projects, you should go with only one project.

Otherwise, you will need your server-side project to depend on your client project, since any data objects that are shared must be part of the client (so gwt can create their version of javascript). It intuitively amazes me as backward.

Alternatively, you can create 3 projects; one server, one client and one with all shared classes. But doing this will give you two projects that gwt needs to compile, and you have to plug them in again. If you fail to deal with some strange problem of integrating outdated gwt-based code, I donโ€™t see what it will bring to you.

Of the two important gwt-based projects that I worked on (using the same technology stack that you are referring to), I used one project.

+2
source

I use one project for the Tomcat GWT client and backend, and it works great. I like the convenience of quick protocol changes on both sides, and then one build step.

The war catalog in a GWT project can use all non-GWT materials youโ€™re used to with arbitrary directories and files, so itโ€™s very convenient to mix JSP, HTML and plain JavaScript directly with GWT.

+2
source

Source: https://habr.com/ru/post/1340054/


All Articles