Google recommends the use of the command pattern when building complex GWT applications. The idea seems to have some merit and various frameworks have been developed to help. However, most of the examples I found are using GWT-RPC for client/server communication.
We are considering developing a RESTful web service for our Java backend — and using that for client/server communication (possibly using a framework like Resty).
But is the command pattern even compatible with Rest web services? What would those Rest URLs look like? How would command batching and undo be supported?
You would have to implement batching yourselves if you don’t use some package that supports it. At our company we decided to go with a straight REST interface – the expense of writing our own batching over a single API was less than the expense of making a RequestFactory API and a public API.
You’d have to somehow encode your multiple rest urls and payloads into a single url and payload!