Tuesday, May 19, 2020

Re: how to run gwt newer version in netbeans

Sorry it is just what Thomas said, you need to separate into following Maven / project modules:

(1) API: the interface between Client and Server module
(2) Server: where the server be implemented (Spring Boot, Quarkus, Servlet GWT,..). This module could implement the API module.
(3) Client: where the GWT webapp implemented. This module implements the API module as well.

As a simple example take a look at this project, it also has an explanation on those modules:

As an alternative you could just use the Maven generator from Thomas plugin (see Thomas comment),

For a bad example you can take a look at this project:

The package structure is completely correct but I put everything in ONE Maven project which is not good because you could have chaos in the classpath like Thomas said. I was lucky at that time to be able to put everything running (Spring Boot, GWT, etc.), but today maybe not anymore since Spring Boot add maybe new Jetty, etc.

Hope this helps.
Lofi

Am Samstag, 16. Mai 2020 12:44:45 UTC+2 schrieb Gordan Krešić:
On 16. 05. 2020. 00:23, Dr. Lofi Dewanto wrote:
> I would prefer just using:
>
> [...]
> (3) Best practice, never mix client- and server-side. Make a stand-alone
> Maven project for your client-based webapp / webbrowser.

Could you elaborate this a bit further, please?

IMHO, sharing codebase between client and server, especially domain model
which is really easy to make compatible on both ends, it one of the main
benefits in using GWT. Even further, I'm advising mixed Java/JavaScript
teams to use GWT to export ther domain model as a JS lib to be consumed by
frontend developers which use Angular/React/whatever.

        -gkresic.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/f940e86b-5770-4528-adb3-8ede440bf837%40googlegroups.com.

No comments:

Post a Comment