Closed GoogleCodeExporter closed 9 years ago
Code review:
http://codereview.appspot.com/2373042/
Original comment by brendanp...@gmail.com
on 6 Oct 2010 at 9:46
I've now got a bunch of classes that implement DispatchRequest. I've renamed
DispatchRequestImpl class, and removed DispatchRequestFactory, as misko hevery
says static methods are hard to test.
- GwtHttpDispatchRequest (was DispatchRequestImpl)
- CompletedDispatchRequest (always returns isPending = false, for use by
ClientActionHandlers that don't make async requests)
- CallbackDispatchRequest( is passed a AsyncCallback. isPending returns true,
until onComplete or onFailure is called, at which point isPending return false.
Also, calling cancel() will cause onComplete and onFailure not call the
callback so client code will not be executed. For use by ClientActionHandlers
that don't use gwt-rpc - such as my geocoding client action handler).
- DelegatingDispatchRequest(is a DispatchRequest that will contain another
DispatchRequest at some point in the future. Needed for use with
ClientActionHandlers that come from AsyncProviders.
We'll use 'new' to create the DispatchRequest objects instead of the factory.
I think the following presentation says it's ok, as these are all "value
objects", not "service objects". TESTING DESIGN SKILLS – 6 VALUE OBJECTS VS
SERVICE OBJECTS http://misko.hevery.com/presentations/
Original comment by bren...@doherty.net.nz
on 6 Oct 2010 at 9:51
Original comment by bren...@doherty.net.nz
on 7 Oct 2010 at 5:29
Original comment by philippe.beaudoin
on 8 Oct 2010 at 9:56
Original comment by goudreau...@gmail.com
on 15 Oct 2010 at 1:42
Original issue reported on code.google.com by
bren...@doherty.net.nz
on 6 Oct 2010 at 8:06