New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dispatch Projects Update #316
Conversation
Conflicts: gwtp-core/gwtp-dispatch-rest/src/main/java/com/gwtplatform/dispatch/client/gin/RestDispatchAsyncModule.java gwtp-core/gwtp-dispatch-rest/src/main/java/com/gwtplatform/dispatch/client/rest/RestDispatchAsync.java
Added jax-rs to gin exceptions.
Updated the carstore for the new serializer and rest service syntax
…v_rest_dispatch_standalone Conflicts: gwtp-core/gwtp-dispatch-rest/src/main/java/com/gwtplatform/dispatch/client/rest/ActionMetadataProvider.java
… into cv_rest_dispatch_standalone
GJ-4: Remove the need for the Result interface
Migrate to Errai Marshalling
@@ -56,34 +55,30 @@ | |||
} | |||
|
|||
@GET | |||
public GetResults<ManufacturerDto> getManufacturers() { | |||
return new GetResults<ManufacturerDto>(Manufacturer.createDto(manufacturerDao.getAll())); | |||
public List<ManufacturerDto> getManufacturers() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With REST, it's always better to send a Response object. It gives you control on the HTTP status to send
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started doing it and it seems to expose something bigger. The carstore resources should return more relevant HTTP statuses (created, no content, not found, etc). Right now everything will return Repsonse.ok(...), but that's a lead for a story in the next iteration.
It can also mean updating the front-end accordingly. ie: If getManufacturer(321) returns with Status.NOT_FOUND, then we can display a custom error message in the UI.
very looong PR :) Two comments :
|
Add extension points to the dispatch code
RPC backward compatibility
Extracted common code between RPC and REST DispatchAsync
Extract common code from dispatch projects (part 1)
…h_update Conflicts: gwtp-build-tools/pom.xml gwtp-carstore/pom.xml gwtp-carstore/src/main/java/com/gwtplatform/carstore/server/rest/ManufacturerResource.java gwtp-core/gwtp-all/pom.xml gwtp-core/gwtp-clients-common/pom.xml gwtp-core/gwtp-crawler/pom.xml gwtp-core/gwtp-dispatch-rest/pom.xml gwtp-core/gwtp-dispatch-rpc-client/pom.xml gwtp-core/gwtp-dispatch-rpc-server-guice/pom.xml gwtp-core/gwtp-dispatch-rpc-server-spring/pom.xml gwtp-core/gwtp-dispatch-rpc-server/pom.xml gwtp-core/gwtp-dispatch-rpc-shared/pom.xml gwtp-core/gwtp-dispatch-rpc-test/pom.xml gwtp-core/gwtp-mvp-client/pom.xml gwtp-core/gwtp-processors/pom.xml gwtp-core/gwtp-tester/pom.xml gwtp-core/pom.xml gwtp-crawler-service/pom.xml pom.xml
Dispatch documention
Replaced Errai by gwt-jackson
@christiangoudreau @olafleur @meriouma @olafleur @PhilBeaudoin |
Updated Dispatch Projects Former-commit-id: 9e0d3ad
_Change Log:_
gwtp-dispatch-rest
RestDispatch
implementation toRestDispatchCall
gwtp-dispatch-client
com.gwtplatform.dispatch.rpc.client.*
com.gwtplatform.dispatch.rpc.client.*
DispatchAsync
implementation toRpcDispatchExecuteCall
andRpcDispatchUndoCall
. They have the same extensions pointsDispatchAsync
previously hadgwtp-dispatch-server
com.gwtplatform.dispatch.rpc.server.*
com.gwtplatform.dispatch.rpc.server.*
gwtp-dispatch-server-guice
com.gwtplatform.dispatch.rpc.server.guice.*
com.gwtplatform.dispatch.rpc.server.guice.*
gwtp-dispatch-server-spring
com.gwtplatform.dispatch.rpc.server.spring.*
com.gwtplatform.dispatch.rpc.server.spring.*
gwtp-dispatch-shared
com.gwtplatform.dispatch.rpc.shared.*
com.gwtplatform.dispatch.rpc.shared.*
Additions
DispatchCall
abstraction) shared by both the REST and RPC dispatch projects.