Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
gwt-maven-archetypes
====================

This project contains Maven archetypes for modular GWT projects.
This project contains Maven archetypes for modular GWT projects. The 2 available archetypes differ
in their client-server communication approach:

- `modular-webapp`: Uses traditional GWT RPC (Remote Procedure Call)
- Client communicates via RemoteService interface with @RemoteServiceRelativePath
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sublist is not needed IMO, that's more or less the definition of GWT RPC.

- Requires both sync (GreetingService) and async (GreetingServiceAsync) interfaces
- Server implements the service interface directly

- `modular-requestfactory`: Uses GWT [RequestFactory](https://www.gwtproject.org/doc/latest/DevGuideRequestFactory.html)
- Client communicates via RequestContext with @ServiceName annotation
- Uses proxy objects (GreetingResponseProxy) for data transfer
- Requires a RequestFactory interface to group contexts
- More modern, supports data validation and has better performance for complex data models

Both create modular multi-module Maven projects with client, server, and shared modules, but RequestFactory is the newer,
more efficient approach for GWT applications.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree with that characterization. RF implementation is complex and hard to maintain, and is today unmaintained in practice.

A "modern" approach would likely use web APIs with JSON (so called "REST APIs"), but otherwise I'd recommend RPC over RF nowadays.

That said, I don't want to be prescriptive other than about the client/shared/server separation.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally hear you! Thanks for providing your point of view.
I am returning back to GWT projects after being into other platforms for quite some time - hence my confusion over the RF approach. The only reason I added this info is just the research I made - which is def not extensive.
I'll remove the section.

Question though. You say:

I don't want to be prescriptive other than about the client/shared/server separation.

but it looks like client/shared/server separation is pretty much the same between RPC vs RF? Do you mind providing more info?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question though. You say:

I don't want to be prescriptive other than about the client/shared/server separation.

but it looks like client/shared/server separation is pretty much the same between RPC vs RF? Do you mind providing more info?

Well this is actually exactly my point: the archetypes are there for that client/shared/server separation, whichever flavor you choose, and I don't want to tell anyone which one to pick (the raison d'être of the RF archetype is that it has specific needs, otherwise there'd only be one archetype)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tbroyer let me confirm I understand everything correctly:
Because of the differences how RF and RPC are implemented, there are 2 different artifacts. Engineers who already know which approach they want - know what artifact to select.

I guess we still need the minimal info to help engineers who are not overly familiar with both PRC and RF to select the archetypeArtifactId option? I mean people like me :-)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://gwtproject.org is where that information lives (or should)


How to use
----------
Expand Down