gabrial11392 / gwt-platform

Automatically exported from code.google.com/p/gwt-platform
0 stars 0 forks source link

backend confiugrable guice/spring #44

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
suggest backend would be configurable to either use guide or spring. spring
is nice as it's reputation 

Original issue reported on code.google.com by second.c...@gmail.com on 1 Apr 2010 at 3:00

GoogleCodeExporter commented 9 years ago
Sounds like a good idea. If someone wants to step forward and do this, I would 
gladly 
add it to GWTP.

Original comment by philippe.beaudoin on 1 Apr 2010 at 3:08

GoogleCodeExporter commented 9 years ago

Original comment by philippe.beaudoin on 1 Apr 2010 at 6:45

GoogleCodeExporter commented 9 years ago

Original comment by philippe.beaudoin on 28 Apr 2010 at 5:40

GoogleCodeExporter commented 9 years ago

Original comment by philippe.beaudoin on 6 Jul 2010 at 7:44

GoogleCodeExporter commented 9 years ago
Spring support would be great. There is a gwt-dispatch-spring-ext project. 
Since gwt-platform is based on gwt-platform it could be added easyly?

http://code.google.com/p/gwt-dispatch-spring-ext/

Original comment by johannes...@googlemail.com on 12 Jul 2010 at 9:40

GoogleCodeExporter commented 9 years ago
Implementation started in clone http://code.google.com/r/nejakyusername-spring/

Original comment by nejakyus...@gmail.com on 25 Jul 2010 at 10:51

GoogleCodeExporter commented 9 years ago
Since I haven't seen anything done in regards to this bug, I'm going to start 
working on this as I believe I will have a need for it very shortly. 

Original comment by larse...@gmail.com on 31 Aug 2010 at 8:07

GoogleCodeExporter commented 9 years ago
Cool, nice to see new people getting involved !

Original comment by goudreau...@gmail.com on 31 Aug 2010 at 8:10

GoogleCodeExporter commented 9 years ago
I had already done this task, but unfortunatelly on SVN trunk, not on mercurial 
one. So currently I'm at the phase of migrating changes into HG clone. 

But ... If you mind that you want to do the work twice ... go for it.

Peter

Original comment by nejakyus...@gmail.com on 31 Aug 2010 at 9:04

GoogleCodeExporter commented 9 years ago
Some time ago I've wrotte a simple port of gwt-dispatch && presenter for spring 
as server side DI (http://code.google.com/p/orcades-gwt-spring/)
It was quite an easy task so I think I could apply this to gwtp if there is 
some interest.
Cheers,
Olivier.

Original comment by olivier....@gmail.com on 14 Sep 2010 at 6:31

GoogleCodeExporter commented 9 years ago
Given that 13 persons have starred it, I think there is some interest. Let's 
give nejakyusername a couple of days to see if he's still working on this, 
otherwise I say we assign the issue to you, Olivier.

Original comment by philippe.beaudoin on 14 Sep 2010 at 6:55

GoogleCodeExporter commented 9 years ago

Original comment by philippe.beaudoin on 22 Sep 2010 at 1:40

GoogleCodeExporter commented 9 years ago
Guys, I'm apologize for the delay. I had a tons of other working tasks. 
Currently I've merged changes with the trunk into my HG clone. Currently I'm 
preparing documentation and tests to be sure that everything is working 
correctly. I'll be finish this during the weeking.

Thank you for your patient.

Peter

Original comment by nejakyus...@gmail.com on 23 Sep 2010 at 10:12

GoogleCodeExporter commented 9 years ago
Cool ! Prepare a CR with CodeReview if you can ! :D

Cheers

Original comment by goudreau...@gmail.com on 23 Sep 2010 at 10:19

GoogleCodeExporter commented 9 years ago
Sure, I'll prepare that.

Original comment by nejakyus...@gmail.com on 24 Sep 2010 at 7:22

GoogleCodeExporter commented 9 years ago
Any update on this? Also, I bumped this to high priority for release 0.5, since 
this is being very frequently requested on the forum.

Original comment by philippe.beaudoin on 29 Sep 2010 at 5:39

GoogleCodeExporter commented 9 years ago
Great, I'm very impatient :)

2 points that might worth new threads:

    * Spring Security: In my old integration with gwt-presenter I was also supporting spring-security  (SS) at service level with client exception handling. Did you plan to support SS.

    * Maven: I've tried gwt-platform and sample in my environnement which is mavenized to the root ( :) ) and I encountered some issues (resolved ;) ). Would you be interested in adding a more maven friendly layout.

Thx for gwt-platform && add on.

Original comment by olivier....@gmail.com on 29 Sep 2010 at 6:46

GoogleCodeExporter commented 9 years ago
Test for spring based dispatch service is done, and working :) [It means that 
spring support for gwtp is correctly done, but some more tests will be fine.] 
I'm working on documentation at this moment. Anyway, who is interested in the 
code, its here: http://code.google.com/r/nejakyusername-spring/ (still waiting 
for my alter ego in order to prepare code review :) )

Olivier, thanks for poiting this out. I've added you into this wave thread: 
https://wave.google.com/wave/#restored:wave:googlewave.com%252Fw%252BZYi_Prc-A 
It's related to maven based support for gwt-platform. Please, add your 
issues/improvements there. 

You can create new wave related to security if you want.

Thanks,
Peter

Original comment by nejakyus...@gmail.com on 30 Sep 2010 at 6:48

GoogleCodeExporter commented 9 years ago
Thanx, I've tried to checkout your dev but the command: hg clone 
https://nejakyusername-spring.googlecode.com/hg/ nejakyusername-spring never 
gives me the "last" version of the code (I'm on "default" ), I cannot see any 
spring feature :(
I'm not fluant at all with Hg, IMHO git is far more intuive ;)

Original comment by olivier....@gmail.com on 4 Oct 2010 at 9:11

GoogleCodeExporter commented 9 years ago
trust me ... there are a spring features ... at directory:
http://code.google.com/r/nejakyusername-spring/source/browse/#hg/src/com/gwtplat
form/dispatch/server/spring
and also the test case:
https://nejakyusername-spring.googlecode.com/hg/test/com/gwtplatform/dispatch/se
rver/spring/

Original comment by nejakyus...@gmail.com on 5 Oct 2010 at 7:31

GoogleCodeExporter commented 9 years ago
Yep I can see them througth the webui, but when I'm cloning the repository with:
hg clone https://nejakyusername-spring.googlecode.com/hg/ nejakyusername-spring
the result only contains guice implementation. Am I missing something ?
Thanks for your patience, no doubt that's I'm faulty :(

Original comment by olivier....@gmail.com on 5 Oct 2010 at 9:18

GoogleCodeExporter commented 9 years ago
After cloning, make sure you call 
hg update
If it still fails call
hg update f20716e8d2
(This seems to be the latest revision.)

Original comment by philippe.beaudoin on 5 Oct 2010 at 10:12

GoogleCodeExporter commented 9 years ago
hg update f20716e8d2 
Works !!!
Thanks a lot, is it normal behaviour of hg ? 

Original comment by olivier....@gmail.com on 5 Oct 2010 at 10:37

GoogleCodeExporter commented 9 years ago
hg up (or hg update) moves to the latest revision of your current branch 
(intially, the default branch). If the code is in a named branch (couldn't 
check in this case from the web UI) then you need to switch to that branch via:
hg up MyBranchName
Or you can always use the revision number... (Which you did in this case.)

Original comment by philippe.beaudoin on 5 Oct 2010 at 10:44

GoogleCodeExporter commented 9 years ago
is https://nejakyusername-spring.googlecode.com/hg/  going to merge with 
http://gwt-platform.googlecode.com/hg/ in the future? or stay as separate 
project? if stay at separate project, that will make updating of gwt-platform 
tedious 

Original comment by second.c...@gmail.com on 6 Oct 2010 at 6:03

GoogleCodeExporter commented 9 years ago
It'll be merged after code review.

Original comment by goudreau...@gmail.com on 6 Oct 2010 at 11:16

GoogleCodeExporter commented 9 years ago
Do we know when this code review will occur?

Original comment by camec...@gmail.com on 8 Oct 2010 at 3:50

GoogleCodeExporter commented 9 years ago
I've just pulled Peter's spring support into the trunk. That was a big job 
given they're based off a relatively old revision. I have tested my samples and 
PuzzleBazar, they all work with minimal modification, documented in the wiki 
under PortingV1.

Right now the ant build is not compiling the spring classes. If somebody want 
to take a shot at that it would be very nice.

One thing that worries me is that there seems to be a lot of cut and paste 
between the Guice and Spring classes. Do you think we could refactor to correct 
this?

Original comment by philippe.beaudoin on 9 Oct 2010 at 1:31

GoogleCodeExporter commented 9 years ago
Hi Guys,

Phillipe, you are never sleep? :) Nice job ... when I was creating a spring 
related dispatch implementation I've extracted all common classes/code into 
abstract classes - that is the cut/paste pattern (I've just reused what was 
possible to reuse)

Here is the code review:
http://codereview.appspot.com/2409041/

If you suggest any refactoring, let's doit :) 

Thanks,
Peter

Original comment by nejakyus...@gmail.com on 9 Oct 2010 at 8:25

GoogleCodeExporter commented 9 years ago
And the documentation:
http://code.google.com/r/nejakyusername-spring/

Enjoy,
Peter

Original comment by nejakyus...@gmail.com on 9 Oct 2010 at 8:44

GoogleCodeExporter commented 9 years ago
Hi all,
 Just try the trunk with Spring support. But IMHO there are some issues at least under my environnement (maven build and macosx).
* some packages have different case in their name, but checkouted directory 
don't respect this case.
* test classes are in same src build so test deps (junit, mockito ...) should 
be compile or at least provided.

Thanx for all of this.

Patch provided.

Original comment by olivier....@gmail.com on 9 Oct 2010 at 2:42

Attachments:

GoogleCodeExporter commented 9 years ago
Hi Olivier,

you are right, branch is not correctly merged into the trunk, for example in 
the original trunk has the directory with the name actionHandler
(http://code.google.com/r/nejakyusername-spring/source/browse/#hg/src/com/gwtpla
tform/dispatch/server/actionHandler)
and in the trunk it was changed into actionhandler
(http://code.google.com/p/gwt-platform/source/browse/#hg/src/com/gwtplatform/dis
patch/server/actionhandler)

I don't understand the second issue, why you proposing change the scope from 
test into provided?

Original comment by nejakyus...@gmail.com on 9 Oct 2010 at 4:17

GoogleCodeExporter commented 9 years ago
The packages are now all lowercase, exactly to try to get rid of this problem. 
I thought I changed everything to lowercase, but maybe there are some mercurial 
issues.

The test classes problem is discussed elsewhere. These classes are meant as a 
new external module to facilitate testing (See in the wiki LibraryOverview). 
Just don't compile the test module if you do not use it. This should be solved 
when the project is mavenized (Issue 211).

Original comment by philippe.beaudoin on 9 Oct 2010 at 5:54

GoogleCodeExporter commented 9 years ago
@Peter for the second issue 
The right solution is to put the test classes in test source folder, but then 
there are other problems that raise.

To "solve" them I had to:
 - let maven process annotation.
 - @Ignore non test case file.
 - Skip some test ( I've commented out //FIXEME @Test the faulty test.

Then mvn clean install passes :)

Patch attached.
Best regards.

Original comment by olivier....@gmail.com on 9 Oct 2010 at 6:09

Attachments:

GoogleCodeExporter commented 9 years ago
@Olivier I disagree, the test classes are framework classes and belong in the 
src folder.

Original comment by philippe.beaudoin on 9 Oct 2010 at 6:15

GoogleCodeExporter commented 9 years ago
@Philippe
 I apologize, I didn't saw your comment and the link to Issue 211.
 So a tmp workaraound is to change scope Junit && Mockito to "provided" ?
 But then I still have to:
  * move META-INF to resources/test (as specified in the pom).
  * Ignore some file which are not test case.
  * Skip some test.

Original comment by olivier....@gmail.com on 9 Oct 2010 at 6:47

GoogleCodeExporter commented 9 years ago
Trunk work now.
Thanx

Original comment by olivier....@gmail.com on 9 Oct 2010 at 6:53

GoogleCodeExporter commented 9 years ago
i tried to use spring as backend, but how to config in web.xml.
it seems to post to /[gwt module]/dispatch, can i change this?
Thanks

Original comment by Ruoc...@gmail.com on 10 Oct 2010 at 8:55

GoogleCodeExporter commented 9 years ago
There's some majuscules in packages name in trunk to change... do we open 
another issue for this?

Original comment by goudreau...@gmail.com on 10 Oct 2010 at 2:46

GoogleCodeExporter commented 9 years ago
I saw too, I guess there are some issues with hg and perhaps refactoring 
process.
There is a patch attached to this comment who fixes those case issues.
The patch also changes the compiler argument to let the test phase work with 
maven.
I had also to change scope of mockito and junit to provided (to compile 
framework component that depends on it).
The resulting artifact then work with sample.

Original comment by olivier....@gmail.com on 10 Oct 2010 at 3:48

Attachments:

GoogleCodeExporter commented 9 years ago
Any status on this?  I noticed that the spring classes are not being built.

Original comment by camec...@gmail.com on 25 Oct 2010 at 3:42

GoogleCodeExporter commented 9 years ago
Any idea if there's a working sample of this somewhere, to include example 
web.xml, applicationContext.xml, etc.....

Original comment by ShieldsJ...@gmail.com on 26 Oct 2010 at 12:19

GoogleCodeExporter commented 9 years ago
maybe the testcase is good starting point
http://code.google.com/r/nejakyusername-spring/source/browse/test/com/gwtplatfor
m/dispatch/server/spring/ActionSpringTest.java

at least for application context configuration.

Original comment by nejakyus...@gmail.com on 26 Oct 2010 at 12:22

GoogleCodeExporter commented 9 years ago
We followed the test case almost identically and keep getting a 404 error.... 
Appears that requests from the client are going to /dispatch and there's 
nothing mapping to handle it....

Original comment by ShieldsJ...@gmail.com on 26 Oct 2010 at 2:45

GoogleCodeExporter commented 9 years ago
exactly, test case covers only the spring configuration, not web descriptor 
configuration web.xml

there's many ways how to integrate spring backend with remote service servlets. 
I'm using gwt-sl library. I can place an example somewhere if you will not able 
to configure it correctly.

Original comment by nejakyus...@gmail.com on 26 Oct 2010 at 7:03

GoogleCodeExporter commented 9 years ago
Yes - please!!! Can you share your example??

Thanks!!!!

Original comment by ShieldsJ...@gmail.com on 26 Oct 2010 at 2:59

GoogleCodeExporter commented 9 years ago
I have been working on cleaning up a few issues and will be submitting an 
example based on the Basic GWTP example within a day or so.

Original comment by camec...@gmail.com on 6 Nov 2010 at 1:37

GoogleCodeExporter commented 9 years ago
I have completed a sample for using Spring with GWTP.  Where should I put the 
sample?

Original comment by camec...@gmail.com on 13 Nov 2010 at 4:32

GoogleCodeExporter commented 9 years ago
Into the sample repository with other sample, but before, you must make sure 
that the ant script for samples still work. Else you can use your own 
repository and open an issue to update the ant script file and to push your 
sample into the sample reposity when it'll be done.

Original comment by goudreau...@gmail.com on 13 Nov 2010 at 4:42

GoogleCodeExporter commented 9 years ago
THis will probably need updating the ant script for GWTP, as I think it skips 
all the Spring class for now as I don't have all the jar dependencies. I was 
hoping we would have maven at this point... :(

Original comment by philippe.beaudoin on 14 Nov 2010 at 12:44