Skip to content
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

Merged
merged 81 commits into from Dec 2, 2013
Merged

Dispatch Projects Update #316

merged 81 commits into from Dec 2, 2013

Conversation

Chris-V
Copy link
Member

@Chris-V Chris-V commented Aug 21, 2013

_Change Log:_

gwtp-dispatch-rest

  • Replaced Piriti by gwt-jackson
  • Removed missing jax-rs annotation from the compile report
  • Added extension points and interfaces
  • Moved some code from the RestDispatch implementation to RestDispatchCall

gwtp-dispatch-client

  • Renamed artifact to gwtp-dispatch-rpc-client
  • Moved classes to com.gwtplatform.dispatch.rpc.client.*
  • The old classes are still there but are deprecated. If you wish to stay up to date and prevent future migration issues, make sure you use the classes available in com.gwtplatform.dispatch.rpc.client.*
  • Added extension points and interfaces
  • Moved some code from the DispatchAsync implementation to RpcDispatchExecuteCall and RpcDispatchUndoCall. They have the same extensions points DispatchAsync previously had

gwtp-dispatch-server

  • Renamed artifact to gwtp-dispatch-rpc-server
  • Moved classes to com.gwtplatform.dispatch.rpc.server.*
  • The old classes are still there but are deprecated. If you wish to stay up to date and prevent future migration issues, make sure you use the classes available in com.gwtplatform.dispatch.rpc.server.*

gwtp-dispatch-server-guice

  • Renamed artifact to gwtp-dispatch-rpc-server-guice
  • Moved classes to com.gwtplatform.dispatch.rpc.server.guice.*
  • The old classes are still there but are deprecated. If you wish to stay up to date and prevent future migration issues, make sure you use the classes available in com.gwtplatform.dispatch.rpc.server.guice.*

gwtp-dispatch-server-spring

  • Renamed artifact to gwtp-dispatch-rpc-server-spring
  • Moved classes to com.gwtplatform.dispatch.rpc.server.spring.*
  • The old classes are still there but are deprecated. If you wish to stay up to date and prevent future migration issues, make sure you use the classes available in com.gwtplatform.dispatch.rpc.server.spring.*

gwtp-dispatch-shared

  • Renamed artifact to gwtp-dispatch-rpc-shared
  • Moved classes to com.gwtplatform.dispatch.rpc.shared.*
  • The old classes are still there but are deprecated. If you wish to stay up to date and prevent future migration issues, make sure you use the classes available in com.gwtplatform.dispatch.rpc.shared.*

Additions

  • Created 2 new artifacts gwtp-dispatch-common-shared and gwtp-dispatch-common-client. They contain code (ie: DispatchCall abstraction) shared by both the REST and RPC dispatch projects.

Chris-V and others added 24 commits August 14, 2013 10:09
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
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
GJ-4: Remove the need for the Result interface
@@ -56,34 +55,30 @@
}

@GET
public GetResults<ManufacturerDto> getManufacturers() {
return new GetResults<ManufacturerDto>(Manufacturer.createDto(manufacturerDao.getAll()));
public List<ManufacturerDto> getManufacturers() {
Copy link
Contributor

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

Copy link
Member Author

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.

@jDramaix
Copy link
Contributor

very looong PR :)

Two comments :

  • some javadocs on GWTP class should be helpful
  • I don't like that people have to use the errai annotation on their dto. We are now linked to the errai framework. I think that the way we serialize/deserialize object to/from JSOn should be transparent and we should be able in the future to change that without impacting the final developer.

Add extension points to the dispatch code
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
Replaced Errai by gwt-jackson
@Chris-V
Copy link
Member Author

Chris-V commented Dec 2, 2013

@christiangoudreau @olafleur @meriouma @olafleur @PhilBeaudoin
I'm merging now, you can still review this branch (12.5k changes...) or go back to the other PRs. I summarized the change log in the description and the doc should be up to date here https://github.com/ArcBees/GWTP/wiki/Rest-Dispatch-1.1.

Chris-V added a commit that referenced this pull request Dec 2, 2013
@Chris-V Chris-V merged commit 1f07781 into master Dec 2, 2013
@Chris-V Chris-V deleted the cv_rest_dispatch_update branch December 2, 2013 21:55
Chris-V added a commit that referenced this pull request Apr 4, 2014
hpehl pushed a commit to hpehl/GWTP that referenced this pull request Dec 9, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants